From: Enrico Scholz Date: Wed, 24 Mar 2004 01:44:52 +0000 (+0000) Subject: 'rebootmgr' is now a src-script X-Git-Tag: VERSION_0_10~238 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dab70930b05a62596e3bba51aca85270ada91eb;p=util-vserver.git 'rebootmgr' is now a src-script git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1337 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/sysv/rebootmgr.subst b/util-vserver/sysv/rebootmgr similarity index 78% rename from util-vserver/sysv/rebootmgr.subst rename to util-vserver/sysv/rebootmgr index f60a5fe..a29e921 100755 --- a/util-vserver/sysv/rebootmgr.subst +++ b/util-vserver/sysv/rebootmgr @@ -1,19 +1,24 @@ #!/bin/sh -# chkconfig: - 98 10 +# chkconfig: - 98 02 # description: The rebootmgr service is monitoring all virtual servers \ # and restart them as need. Virtual servers are using \ # the /sbin/vreboot command to talk with the reboot manager # processname: rebootmgr # config: /etc/vservers -DEFAULT_VSERVERDIR=/vservers -USR_SBIN=/usr/sbin +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo $"Can not find util-vserver installation; aborting...">&2 + exit 1 +} +. "$UTIL_VSERVER_VARS" + PIDFILE=/var/run/rebootmgr.pid # See how we were called. case "$1" in start) echo "Starting the reboot manager" - cd /etc/vservers + cd $CONFDIR VSERVERS= for serv in *.conf do @@ -24,7 +29,7 @@ case "$1" in VSERVERS="$VSERVERS $serv" fi done - $USR_SBIN/rebootmgr --pidfile $PIDFILE $VSERVERS & + $_REBOOTMGR --pidfile $PIDFILE $VSERVERS & touch /var/lock/subsys/rebootmgr ;; stop)