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:
Yaroslav Tykhiy 2005-10-26 04:32:31 +00:00
parent 8d52cc90fb
commit 6fa3ee6c30
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151687

View File

@ -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=