From: Enrico Scholz Date: Sat, 19 Mar 2005 02:12:04 +0000 (+0000) Subject: added to be removed soon... X-Git-Tag: IPSENTINEL_VERSION_0_12~52 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39a4efb7d1058013939b5a8030667c2c334c860e;p=util-vserver.git added to be removed soon... git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1942 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/distrib/redhat/initsignal b/util-vserver/distrib/redhat/initsignal new file mode 100755 index 0000000..840654c --- /dev/null +++ b/util-vserver/distrib/redhat/initsignal @@ -0,0 +1,45 @@ +#! /bin/bash +# +# initsignal Signals final start/stop state +# +# chkconfig: 2345 99 99 +# description: This service puts a single byte into the \ +# /var/run/vserver/initsignal fifo + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +SIGNALPIPE=/var/run/vserver/initsignal + +lockfile=/var/lock/subsys/initsignal + +sendSignal() { + test -p "$SIGNALPIPE" && : >"$SIGNALPIPE" +} + +start() { + echo -n $"Signaling final start-state: " + sendSignal && success || failure + RETVAL=$? + echo + touch "$lockfile" + return $RETVAL +} + +stop() { + echo -n $"Signaling final stop-state: " + sendSignal && success || failure + RETVAL=$? + echo + rm -f "$lockfile" + return $RETVAL +} + +case "$1" in + start|stop) + "$1";; + *) + echo $"Usage: $0 {start|stop}" + exit 1 +esac