summaryrefslogtreecommitdiffstats
path: root/examples/root/etc
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-04-14 03:35:48 +0000
committerLuke Kanies <luke@madstop.com>2005-04-14 03:35:48 +0000
commit8fd8d626fac7f88f6be9fdf908b60cf2dfb2f46b (patch)
treecd39842cafc49d0f0430a6f349c7b88845a3b267 /examples/root/etc
parent9da14852c2518baeb6ee4893735de44ebd83efa7 (diff)
downloadpuppet-8fd8d626fac7f88f6be9fdf908b60cf2dfb2f46b.tar.gz
puppet-8fd8d626fac7f88f6be9fdf908b60cf2dfb2f46b.tar.xz
puppet-8fd8d626fac7f88f6be9fdf908b60cf2dfb2f46b.zip
removing output, and fixing path so it is not hardcoded
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@142 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'examples/root/etc')
-rwxr-xr-xexamples/root/etc/init.d/sleeper13
1 files changed, 10 insertions, 3 deletions
diff --git a/examples/root/etc/init.d/sleeper b/examples/root/etc/init.d/sleeper
index 7a6614087..4b91a381b 100755
--- a/examples/root/etc/init.d/sleeper
+++ b/examples/root/etc/init.d/sleeper
@@ -1,6 +1,11 @@
-#! /bin/sh
+#!/bin/sh
-PATH=$PATH:/home/luke/svn/blink/examples/root/bin
+# $Id$
+
+script=$0
+path=`echo $script | sed 's/etc..*/bin/'`
+
+PATH=$PATH:$path
case "$1" in
start)
@@ -10,7 +15,9 @@ case "$1" in
kill `ps -ef | grep -v grep | grep sleeper | grep perl | awk '{print $2}'`
;;
status)
- if sh -c "ps -ef | grep -v grep | grep -v init.d | grep sleeper"; then
+ output=`ps -ef | grep -v grep | grep -v init.d | grep sleeper`
+ retvalue=$?
+ if [ -n "$output" ]; then
exit 0
else
exit 1