summaryrefslogtreecommitdiffstats
path: root/debian/buildsys/2.3/bcfg2.init
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-11-22 21:10:03 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-11-22 21:10:03 +0000
commit28f5be4543277452811492752d887dfd7030bfc5 (patch)
tree163fa6eede29abc46f5c6c4a356dfee5a56ef047 /debian/buildsys/2.3/bcfg2.init
parentc975468b624f78fb3d94eaf887deaa0dbfe4d3ba (diff)
downloadbcfg2-28f5be4543277452811492752d887dfd7030bfc5.tar.gz
bcfg2-28f5be4543277452811492752d887dfd7030bfc5.tar.bz2
bcfg2-28f5be4543277452811492752d887dfd7030bfc5.zip
Packaging fixes
* Bring init scripts into line between versions * Change rules to autogenerate doc/manual.html if it doesn't exist git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2519 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'debian/buildsys/2.3/bcfg2.init')
-rw-r--r--debian/buildsys/2.3/bcfg2.init47
1 files changed, 30 insertions, 17 deletions
diff --git a/debian/buildsys/2.3/bcfg2.init b/debian/buildsys/2.3/bcfg2.init
index 9dd6c87a1..dfa6f014e 100644
--- a/debian/buildsys/2.3/bcfg2.init
+++ b/debian/buildsys/2.3/bcfg2.init
@@ -4,7 +4,25 @@
#
# chkconfig: 2345 19 81
# description: bcfg2 client for configuration requests
-#
+#
+### BEGIN INIT INFO
+# Provides: bcfg2
+# Required-Start: $network $named
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: S 0 1 6
+# Short-Description: Configuration management client
+# Description: Bcfg2 is a configuration management system that builds
+# installs configuration files served by bcfg2-server
+# This is a client that installs the server provided
+# Configuration.
+### END INIT INFO
+
+# 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
@@ -16,29 +34,24 @@ test -f "/etc/default/bcfg2" && . /etc/default/bcfg2
[ "$BCFG2_ENABLED" == "0" -o "$BCFG2_INIT" == 0 ] && exit 0
+# Exit if bcfg2 doesn't exist and is not executable
+test -x $BCFG2 || exit 5
+
case "$1" in
start)
- if test -e /etc/donttouchme; then
- rm -f /etc/donttouchme
- echo "bcfg2 does not need to run."
- else
- echo -n "Running bcfg: "
- /usr/sbin/bcfg2 $BCFG2_OPTIONS $BCFG2_OPTIONS_INIT
- echo "bcfg2"
- fi
- ;;
- stop)
- /bin/true
+ echo -n "Running configuration management client: "
+ ${BCFG2} ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_INIT}
+ echo "bcfg2"
;;
- restart)
- $0 stop
- $0 start
+ status)
+ # Since we are always OK, always return OK as status
+ exit 0
;;
- force-reload)
+ restart|reload|stop|force-reload)
true
;;
*)
- echo "Usage: bcfg2 {start|stop|restart}"
+ echo "Usage: $0 {start|stop|restart|reload|force-reload|status}"
exit 1
esac