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

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=