this change makes different behaviour depending is RC_LOGGING enabled or not. and there are some others too, not just --makepid.
like without start-stop-daemon you can't combine --user and --fork and the initlog, sucks in other ways too, like usleep 100000 inside code makes daemon restarts slow when you need the restart immediate. for consistency we should just remove RC_LOGGING support from rc-scripts. will anybody miss it? daemons who want to log their startup errors should use syslog or their own logfiles all whats yours thinks? ---------- Forwarded Message ---------- Subject: SVN: rc-scripts/trunk/rc.d/init.d/functions Date: Wednesday 04 February 2009 From: blues <[email protected]> To: [email protected] Cc: 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 _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit ------------------------------------------------------- -- glen _______________________________________________ pld-devel-en mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
