diff options
author | dougb <dougb@FreeBSD.org> | 2009-07-21 02:49:57 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2009-07-21 02:49:57 +0800 |
commit | 8e0f4bc686aed4e334ae794702d21a0af83b4b3b (patch) | |
tree | 3fde07fa611b3e1a579d47d84a16aa1e3e1b4bb6 /net | |
parent | 6299ab67c96d14573e9db0239d76f631f78ca72b (diff) | |
download | freebsd-ports-gnome-8e0f4bc686aed4e334ae794702d21a0af83b4b3b.tar.gz freebsd-ports-gnome-8e0f4bc686aed4e334ae794702d21a0af83b4b3b.tar.zst freebsd-ports-gnome-8e0f4bc686aed4e334ae794702d21a0af83b4b3b.zip |
Tune up the rc.d script a bit:
1. Change default variable assignments at the top to comments (two of
them were assigning empty default values).
2. Move the default for _enable to below load_rc_config
3. Add the _ifaces and _server options to command_args which eliminates
the need for the precmd
4. s#/usr/local#%%PREFIX%%#
Diffstat (limited to 'net')
-rw-r--r-- | net/dhcprelay/files/dhcprelay.in | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/net/dhcprelay/files/dhcprelay.in b/net/dhcprelay/files/dhcprelay.in index d0f7db65d28c..1321eb02bd17 100644 --- a/net/dhcprelay/files/dhcprelay.in +++ b/net/dhcprelay/files/dhcprelay.in @@ -9,27 +9,22 @@ # # dhcprelay_enable="YES" # - -# override these variables in /etc/rc.conf -dhcprelay_enable=${dhcprelay_enable:-"NO"} -dhcprelay_server=${dhcprelay_server:-} # dhcprelay server(s) -dhcprelay_ifaces=${dhcprelay_ifaces:-} # ethernet interface(s) - -dhcprelay_precmd () -{ - rc_flags="${rc_flags} ${dhcprelay_ifaces} ${dhcprelay_server}" -} +# dhcprelay_server="" # dhcprelay server(s) +# dhcprelay_ifaces="" # ethernet interface(s) . %%RC_SUBR%% name=dhcprelay rcvar=$(set_rcvar) -pidfile=/var/run/${name}.pid -command=/usr/local/bin/${name} -start_precmd=${name}_precmd +pidfile=/var/run/${name}.pid +command=%%PREFIX%%/bin/${name} +command_args="${dhcprelay_ifaces} ${dhcprelay_server}" -echo $rc_flags +# echo $rc_flags load_rc_config ${name} + +dhcprelay_enable=${dhcprelay_enable:"NO"} + run_rc_command "$1" |