--exec "$prog" \
-- "$@"
else
+
if [ "$makepid" ] && [ "$pidfile" ]; then
export PIDFILE="$pidfile"
set -- /lib/rc-scripts/makepid "$@"
# A function to start a program (now it's useful on read-only filesystem too)
daemon() {
- local errors="" end="" waitname="" waittime=""
+ local errors="" waitname="" waittime=""
local exit_code=0
local nice=$SERVICE_RUN_NICE_LEVEL
local fork user closefds redirfds pidfile makepid chdir=/
;;
--fork)
fork=1
- end='&'
;;
--chdir)
shift
;;
--makepid)
makepid=1
+ # makepid implies fork
+ fork=1
;;
-*|+*)
nice=$1