aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/functions4
1 files changed, 3 insertions, 1 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 6d6bb4d5..222cdbe7 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -43,12 +43,14 @@ fi
# A function to start a program.
daemon() {
# Test syntax.
+ gotbase=
case $1 in
'') echo '$0: Usage: daemon [+/-nicelevel] {program}'
return 1;;
--check)
shift
base=$1
+ gotbase="yes"
shift;;
-*|+*) nicelevel=$1
@@ -57,7 +59,7 @@ daemon() {
esac
# Save basename.
- [ -z $base ] && base=`basename $1`
+ [ -z $gotbase ] && base=`basename $1`
# See if it's already running.
pid=`pidofproc $base`