diff options
author | mtm <mtm@FreeBSD.org> | 2003-01-18 05:25:59 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-01-18 05:25:59 +0000 |
commit | 93839ecd4639c86d2633481a8a917bd9f4204821 (patch) | |
tree | 4283fad143ea1e04bb1dacb53ba48def82a7fc54 /etc | |
parent | 291746d5624e221c47c3bf7f6f0deea199544348 (diff) | |
download | FreeBSD-src-93839ecd4639c86d2633481a8a917bd9f4204821.zip FreeBSD-src-93839ecd4639c86d2633481a8a917bd9f4204821.tar.gz |
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)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.subr | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/rc.subr b/etc/rc.subr index d041cf9..05225a6 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -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 ;; |