From db1df7232dfe4f0218d3c30ea43d10bb4f7b16b6 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 28 Aug 2007 14:21:59 +0000 Subject: Client init script updates from jcollie git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3654 ce84e21b-d406-0410-9b95-82705330c041 --- debian/buildsys/common/bcfg2.init | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/buildsys/common/bcfg2.init b/debian/buildsys/common/bcfg2.init index a82a5f06e..bf06f5dbb 100644 --- a/debian/buildsys/common/bcfg2.init +++ b/debian/buildsys/common/bcfg2.init @@ -34,8 +34,8 @@ BCFG2_AGENT=0 # Include default startup configuration if exists test -f "/etc/default/bcfg2" && . /etc/default/bcfg2 -[ "$BCFG2_ENABLED" -eq "0" ] && exit 0 -[ "$BCFG2_AGENT" -eq "0" -a "$BCFG2_INIT" -eq 0 ] && exit 0 +[ "$BCFG2_ENABLED" -eq 0 ] && exit 0 +[ "$BCFG2_AGENT" -eq 0 -a "$BCFG2_INIT" -eq 0 ] && exit 0 # Exit if bcfg2 doesn't exist and is not executable test -x $BCFG2 || exit 5 @@ -51,7 +51,8 @@ BINARY=$(basename $BCFG2) case "$1" in start) echo -n "Running configuration management client: " - if ["$BCFG2_AGENT" = 1] + if [ "$BCFG2_AGENT" -eq 1 ] + then start_daemon ${BCFG2} -A ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_AGENT} STATUS=$? else @@ -59,7 +60,7 @@ case "$1" in STATUS=$? fi - if [ "$STATUS" = 0 ] + if [ "$STATUS" -eq 0 ] then log_success_msg "bcfg2" else @@ -72,11 +73,13 @@ case "$1" in exit 0 ;; stop) - if ["$BCFG2_AGENT" = 1] + if [ "$BCFG2_AGENT" -eq 1 ] + then echo -n "Stopping configuration management client daemon: " killproc ${BINARY} STATUS=$? - if [ "$STATUS" = 0 ]; then + if [ "$STATUS" -eq 0 ] + then log_success_msg "bcfg2" exit 0 else @@ -89,7 +92,8 @@ case "$1" in fi ;; restart|reload|force-reload) - if ["$BCFG2_AGENT" = 1] + if [ "$BCFG2_AGENT" -eq 1 ] + then $0 stop sleep 5 $0 start -- cgit v1.2.3-1-g7c22