diff options
-rw-r--r-- | debian/bcfg2-server.init | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/debian/bcfg2-server.init b/debian/bcfg2-server.init index 7f760bd75..fad18dc42 100644 --- a/debian/bcfg2-server.init +++ b/debian/bcfg2-server.init @@ -16,6 +16,10 @@ # installs configuration files served by bcfg2-server ### END INIT INFO +# Include lsb functions +. /lib/lsb/init-functions + +# Commonly used stuff DAEMON=/usr/sbin/bcfg2-server PIDFILE=/var/run/bcfg2-server.pid PARAMS="-D $PIDFILE" @@ -27,14 +31,14 @@ BCFG2_SERVER_ENABLED=0 # Include default startup configuration if exists test -f "/etc/default/bcfg2-server" && . /etc/default/bcfg2-server -[ "$BCFG2_SERVER_ENABLED" -eq 0 ] && exit 0 +if [ "$BCFG2_SERVER_ENABLED" -eq 0 ] ; then + log_failure_msg "bcfg2-server is disabled - see /etc/default/bcfg2-server" + exit 0 +fi # Exit if $DAEMON doesn't exist and is not executable test -x $DAEMON || exit 5 -# Include lsb functions -. /lib/lsb/init-functions - # Internal variables BINARY=$(basename $DAEMON) |