SVN: rc-scripts/trunk/rc.d/init.d/functions
blues
blues at pld-linux.org
Wed Feb 4 21:28:48 CET 2009
Author: blues
Date: Wed Feb 4 21:28:47 2009
New Revision: 10099
Modified:
rc-scripts/trunk/rc.d/init.d/functions
Log:
- makepid functionality to daemon function
Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions (original)
+++ rc-scripts/trunk/rc.d/init.d/functions Wed Feb 4 21:28:47 2009
@@ -497,12 +497,12 @@
typeset errors="" prog="" end="" waitname="" waittime=""
typeset -i exit_code=0
local nice=$SERVICE_RUN_NICE_LEVEL
- local fork user closefds pidfile chdir=/
+ local fork user closefds pidfile makepid chdir=/
while [ $# -gt 0 ]; do
case $1 in
'')
- msg_usage " daemon [--user user] [--fork] [--waitforname procname] [--waitfortime seconds] [+/-nicelevel] {program} <program args>"
+ msg_usage " daemon [--check] [--user user] [--fork] [--chdir directory] [--closefds] [--waitforname procname] [--waitfortime seconds] [--pidfile file] [--makepid] [+/-nicelevel] {program} <program args>"
return 2
;;
--check)
@@ -539,6 +539,9 @@
shift
pidfile="$1"
;;
+ --makepid)
+ makepid=1
+ ;;
-*|+*)
nice=$1
shift
@@ -601,6 +604,7 @@
${user:+-c $user} \
${chdir:+--chdir "$chdir"} \
${fork:+-b} \
+ ${makepid:+-m} \
--exec "$prog" \
-- ${1:+"$@"}
else
More information about the pld-cvs-commit
mailing list