mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Override $command with $foo_program only if $command
has been set in the first place. This should reduce unwanted side-effects in rc.d scripts that don't mean to use $command and rc.subr(8) methods associated with it at all. Discussed with: brooks Reviewed by: -rc (silence)
This commit is contained in:
parent
8d52cc90fb
commit
6fa3ee6c30
1 changed files with 1 additions and 3 deletions
|
|
@ -495,9 +495,7 @@ run_rc_command()
|
|||
esac
|
||||
|
||||
eval _overide_command=\$${name}_program
|
||||
if [ -n "$_overide_command" ]; then
|
||||
command=$_overide_command
|
||||
fi
|
||||
command=${command:+${_overide_command:-$command}}
|
||||
|
||||
_keywords="start stop restart rcvar $extra_commands"
|
||||
rc_pid=
|
||||
|
|
|
|||
Loading…
Reference in a new issue