diff options
author | yar <yar@FreeBSD.org> | 2005-10-26 04:32:31 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2005-10-26 04:32:31 +0000 |
commit | 4f42d603be95c50d65887debc89052e41b204f45 (patch) | |
tree | 05909df6c9b7b823d5174a8c73d2af456abeec9b /etc | |
parent | 4a93cc5bfd85a58dcffb3863361e5ad288a7efda (diff) | |
download | FreeBSD-src-4f42d603be95c50d65887debc89052e41b204f45.zip FreeBSD-src-4f42d603be95c50d65887debc89052e41b204f45.tar.gz |
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)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.subr | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/etc/rc.subr b/etc/rc.subr index bff3620..4ed122a 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -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= |