mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04:00
rc: run NAME_setup before RC_ARG_precmd
PR: https://forum.opnsense.org/index.php?topic=30656.0
This commit is contained in:
parent
a72dccaa7d
commit
ca9cdd508e
1 changed files with 7 additions and 7 deletions
|
|
@ -1042,12 +1042,12 @@ run_rc_command()
|
|||
if [ -n "$_env" ]; then
|
||||
eval "export -- $_env"
|
||||
fi
|
||||
_run_rc_precmd || return 1
|
||||
# service can redefine all so check for valid targets
|
||||
if [ "$rc_arg" = 'start' -o "$rc_arg" = 'restart' -o \
|
||||
"$rc_arg" = 'reload' ]; then
|
||||
_run_rc_setup || warn "failed to setup ${name}"
|
||||
fi
|
||||
_run_rc_precmd || return 1
|
||||
_run_rc_doit "$_cmd $rc_extra_args" || return 1
|
||||
_run_rc_postcmd
|
||||
return $_return
|
||||
|
|
@ -1107,13 +1107,15 @@ run_rc_command()
|
|||
return 1
|
||||
fi
|
||||
|
||||
_run_rc_setup || warn "failed to setup ${name}"
|
||||
|
||||
if ! _run_rc_precmd; then
|
||||
warn "failed precmd routine for ${name}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# setup the full command to run
|
||||
#
|
||||
# setup the full command to run
|
||||
#
|
||||
check_startmsgs && echo "Starting ${name}."
|
||||
if [ -n "$_chroot" ]; then
|
||||
_cd=
|
||||
|
|
@ -1143,8 +1145,6 @@ $command $rc_flags $command_args"
|
|||
fi
|
||||
fi
|
||||
|
||||
_run_rc_setup || warn "failed to setup ${name}"
|
||||
|
||||
# Prepend default limits
|
||||
_doit="$_cd limits -C $_login_class $_limits $_doit"
|
||||
|
||||
|
|
@ -1188,10 +1188,10 @@ $command $rc_flags $command_args"
|
|||
return 1
|
||||
fi
|
||||
|
||||
_run_rc_precmd || return 1
|
||||
|
||||
_run_rc_setup || warn "failed to setup ${name}"
|
||||
|
||||
_run_rc_precmd || return 1
|
||||
|
||||
_doit=$(_run_rc_killcmd "${sig_reload:-HUP}")
|
||||
_run_rc_doit "$_doit" || return 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue