Make the debug messages, for when a script rolls its own start routine,

more usefull. Currently it just says 'xxx_cmd'; whereas with this
change it will name the routine that's being run.

Approved by: markm (mentor)
This commit is contained in:
mtm 2003-01-18 05:25:59 +00:00
parent 18874b9bb4
commit 823567a323

View File

@ -532,17 +532,19 @@ run_rc_command()
eval _cmd=\$${rc_arg}_cmd _precmd=\$${rc_arg}_precmd \
_postcmd=\$${rc_arg}_postcmd
if [ -n "$_cmd" ]; then
debug "run_rc_command: using XXX_cmd functions."
# if the precmd failed and force
# isn't set, exit
#
debug "run_rc_command: evaluating ${_precmd}()."
if ! eval $_precmd && [ -z "$rc_force" ]; then
return 1
fi
debug "run_rc_command: evaluating ${_cmd}()."
if ! eval $_cmd && [ -z "$rc_force" ]; then
return 1
fi
debug "run_rc_command: evaluating ${_postcmd}()."
eval $_postcmd
return 0
fi
@ -600,6 +602,7 @@ run_rc_command()
# if the precmd failed and force
# isn't set, exit
#
debug "run_rc_command: evaluating ${_precmd}()."
if ! eval $_precmd && [ -z "$rc_force" ]; then
return 1
fi
@ -632,6 +635,7 @@ $command $rc_flags $command_args"
# finally, run postcmd
#
debug "run_rc_command: evaluating ${_postcmd}()."
eval $_postcmd
;;