aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-04-07 16:54:11 +0000
committerBill Nottingham <notting@redhat.com>1999-04-07 16:54:11 +0000
commitd6213696823a7e52a135a154832007e23734e33b (patch)
tree34e7bafac59a69cc11e7dca45393f89938d808d8
parent8429bd0cd30bc2f568ff2177566b32a5a30aed25 (diff)
downloadinitscripts-d6213696823a7e52a135a154832007e23734e33b.tar
initscripts-d6213696823a7e52a135a154832007e23734e33b.tar.gz
initscripts-d6213696823a7e52a135a154832007e23734e33b.tar.bz2
initscripts-d6213696823a7e52a135a154832007e23734e33b.tar.xz
initscripts-d6213696823a7e52a135a154832007e23734e33b.zip
add a --check to daemon so that we don't look for su's pid
-rwxr-xr-xrc.d/init.d/functions7
1 files changed, 6 insertions, 1 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index f22f4941..6d6bb4d5 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -46,13 +46,18 @@ daemon() {
case $1 in
'') echo '$0: Usage: daemon [+/-nicelevel] {program}'
return 1;;
+ --check)
+ shift
+ base=$1
+ shift;;
+
-*|+*) nicelevel=$1
shift;;
*) nicelevel=0;;
esac
# Save basename.
- base=`basename $1`
+ [ -z $base ] && base=`basename $1`
# See if it's already running.
pid=`pidofproc $base`