summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-11-30 18:59:26 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-11-30 18:59:26 +0000
commit302759a996e82fb8761b3a789154a5108a41773f (patch)
tree92da53fe2476b5954b65e17194a847e7d46b2c83 /debian
parentf4142364bd97dd4f5d9070a2de10cd02ab93ab15 (diff)
downloadbcfg2-302759a996e82fb8761b3a789154a5108a41773f.tar.gz
bcfg2-302759a996e82fb8761b3a789154a5108a41773f.tar.bz2
bcfg2-302759a996e82fb8761b3a789154a5108a41773f.zip
Improve agent scripts and daemonization support [bugfix]
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4013 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'debian')
-rw-r--r--debian/buildsys/2.3/bcfg2.init18
-rw-r--r--debian/buildsys/common/bcfg2.init6
2 files changed, 20 insertions, 4 deletions
diff --git a/debian/buildsys/2.3/bcfg2.init b/debian/buildsys/2.3/bcfg2.init
index 9ef9f2b0f..0418efcd9 100644
--- a/debian/buildsys/2.3/bcfg2.init
+++ b/debian/buildsys/2.3/bcfg2.init
@@ -28,11 +28,13 @@ BCFG2_OPTIONS="-q"
# Disabled per default
BCFG2_ENABLED=0
BCFG2_INIT=0
+BCFG2_AGENT=0
# Include default startup configuration if exists
test -f "/etc/default/bcfg2" && . /etc/default/bcfg2
-[ "$BCFG2_ENABLED" -eq "0" -o "$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
@@ -40,7 +42,19 @@ test -x $BCFG2 || exit 5
case "$1" in
start)
echo -n "Running configuration management client: "
- ${BCFG2} ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_INIT}
+
+ if [ "$BCFG2_AGENT" -eq 1 ]
+ then
+ ${BCFG2} -A -i /var/run/bcfg2-agent.pid ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_AGENT}
+ STATUS=$?
+ fi
+
+ if [ "$BCFG2_INIT" -eq 1 ]
+ then
+ ${BCFG2} ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_INIT}
+ STATUS=$?
+ fi
+
echo "bcfg2"
;;
status)
diff --git a/debian/buildsys/common/bcfg2.init b/debian/buildsys/common/bcfg2.init
index bf06f5dbb..330cf4fdd 100644
--- a/debian/buildsys/common/bcfg2.init
+++ b/debian/buildsys/common/bcfg2.init
@@ -53,9 +53,11 @@ case "$1" in
echo -n "Running configuration management client: "
if [ "$BCFG2_AGENT" -eq 1 ]
then
- start_daemon ${BCFG2} -A ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_AGENT}
+ start_daemon ${BCFG2} -A -i /var/run/bcfg2-agent.pid ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_AGENT}
STATUS=$?
- else
+ fi
+
+ if [ "$BCFG2_INIT" -eq 1 ]; then
${BCFG2} ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_INIT}
STATUS=$?
fi