summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/buildsys/common/bcfg2.init18
1 files changed, 11 insertions, 7 deletions
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