From 39a4efb7d1058013939b5a8030667c2c334c860e Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sat, 19 Mar 2005 02:12:04 +0000 Subject: [PATCH] added to be removed soon... git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1942 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/distrib/redhat/initsignal | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 util-vserver/distrib/redhat/initsignal 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 -- 1.8.1.5