added to be removed soon...
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 19 Mar 2005 02:12:04 +0000 (02:12 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 19 Mar 2005 02:12:04 +0000 (02:12 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1942 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/distrib/redhat/initsignal [new file with mode: 0755]

diff --git a/util-vserver/distrib/redhat/initsignal b/util-vserver/distrib/redhat/initsignal
new file mode 100755 (executable)
index 0000000..840654c
--- /dev/null
@@ -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