From 8fd8d626fac7f88f6be9fdf908b60cf2dfb2f46b Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 14 Apr 2005 03:35:48 +0000 Subject: 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 --- examples/root/etc/init.d/sleeper | 13 ++++++++++--- 1 file 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 -- cgit