From 4ea12ce571b8b5df306f72e6a1469711172bfaf5 Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Wed, 29 May 2019 11:09:13 +0200 Subject: [PATCH] install script improvements: using getent group --- debian/damaris-modules.postinst | 9 ++++++++- debian/damaris-modules/etc/init.d/damaris-modules | 6 ++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/damaris-modules.postinst b/debian/damaris-modules.postinst index 45a698b..0d88a15 100755 --- a/debian/damaris-modules.postinst +++ b/debian/damaris-modules.postinst @@ -1 +1,8 @@ -addgroup --system nmr +#!/bin/sh +set -e + +if getent group nmr; then + echo "group nmr exists alread, doing nothing" +else + addgroup --system nmr +fi diff --git a/debian/damaris-modules/etc/init.d/damaris-modules b/debian/damaris-modules/etc/init.d/damaris-modules index d11e754..f5aa7e5 100755 --- a/debian/damaris-modules/etc/init.d/damaris-modules +++ b/debian/damaris-modules/etc/init.d/damaris-modules @@ -1,10 +1,8 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: damaris-backends -# Required-Start: $syslog $local_fs -# Required-Stop: $syslog $local_fs -# Should-Start: $syslog -# Should-Stop: $syslog +# Required-Start: $syslog $remote_fs +# Required-Stop: $syslog $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Startup script to load nmr hardware drivers for use with damaris backends