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:
parent
063a27dc9b
commit
276ae160e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109465
@ -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
|
||||
;;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user