From 902c3519f67eaa7119c02bd78b65bf97f28103be Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 3 Aug 2006 15:35:50 +0000 Subject: More packaging updates from Ressu git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2038 ce84e21b-d406-0410-9b95-82705330c041 --- debian/buildsys/2.3/bcfg2.init | 10 +++++++++- debian/buildsys/common/bcfg2.init | 7 +++++-- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'debian/buildsys') diff --git a/debian/buildsys/2.3/bcfg2.init b/debian/buildsys/2.3/bcfg2.init index a184297e8..e6781208d 100644 --- a/debian/buildsys/2.3/bcfg2.init +++ b/debian/buildsys/2.3/bcfg2.init @@ -6,8 +6,16 @@ # description: bcfg2 client for configuration requests # BCFG2_OPTIONS="-q" + +# Disabled per default +BCFG2_ENABLED=0 +BCFG2_INIT=0 + +# Include default startup configuration if exists test -f "/etc/default/bcfg2" && . /etc/default/bcfg2 +["$BCFG2_ENABLED" == "0" -o "$BCFG2_INIT" == 0 ] && exit 0 + case "$1" in start) if test -e /etc/donttouchme; then @@ -15,7 +23,7 @@ case "$1" in echo "bcfg2 does not need to run." else echo -n "Running bcfg: " - /usr/sbin/bcfg2 $BCFG2_OPTIONS + /usr/sbin/bcfg2 $BCFG2_OPTIONS $BCFG2_OPTIONS_INIT echo "bcfg2" fi ;; diff --git a/debian/buildsys/common/bcfg2.init b/debian/buildsys/common/bcfg2.init index e7466f18d..1c2836c7a 100644 --- a/debian/buildsys/common/bcfg2.init +++ b/debian/buildsys/common/bcfg2.init @@ -22,15 +22,18 @@ # This might need some better logic BCFG2=/usr/sbin/bcfg2 +# Set default options +# You can set script specific options with BCFG2_OPTIONS_INIT BCFG2_OPTIONS="-q" # Disabled per default BCFG2_ENABLED=0 +BCFG2_INIT=0 # Include default startup configuration if exists test -f "/etc/default/bcfg2" && . /etc/default/bcfg2 -test "$BCFG2_ENABLED" != "0" || exit 0 +["$BCFG2_ENABLED" == "0" -o "$BCFG2_INIT" == 0 ] && exit 0 # Exit if bcfg2 doesn't exist and is not executable test -x $BCFG2 || exit 5 @@ -41,7 +44,7 @@ test -x $BCFG2 || exit 5 case "$1" in start) echo -n "Running configuration management client: " - ${BCFG2} ${BCFG2_OPTIONS} + ${BCFG2} ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_INIT} STATUS=$? if [ "$STATUS" = 0 ] then -- cgit v1.2.3-1-g7c22