aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMike Makonnen <mtm@FreeBSD.org>2003-06-07 10:31:17 +0000
committerMike Makonnen <mtm@FreeBSD.org>2003-06-07 10:31:17 +0000
commitd679c13014971b2d0c1afd6b4ec4d8c4a7fb3b82 (patch)
tree7bd5ed6870f71b92de718ce09521ac764ea99263 /etc
parenta1a9b44569495d983e949db11c17a448a0e523e1 (diff)
downloadsrc-d679c13014971b2d0c1afd6b4ec4d8c4a7fb3b82.tar.gz
src-d679c13014971b2d0c1afd6b4ec4d8c4a7fb3b82.zip
The dhcp_program and dhcp_flags variables have to be renamed to
take advantage of the rc.subr(8) glue. They are renamed dhclient_program and dhclient_flags. o Rename them in rc.conf(5) o Rename them in /etc/defaults/rc.conf o Add the deprecated variables to /etc/rc.subr o Isolate the use of the 'command' variable to the NetBSD specific parts in /etc/rc.d/dhclient. o Now that dhcp_flags has also been renamed it will be applied properly by rc.subr(8) glue code. Reported by: John Nielsen <john@jnielsen.net>
Notes
Notes: svn path=/head/; revision=115950
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf4
-rwxr-xr-xetc/rc.d/dhclient4
-rw-r--r--etc/rc.subr2
3 files changed, 6 insertions, 4 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 594f55b54429..75c2603b544c 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -55,8 +55,8 @@ extra_netfs_types="NO" # List of network extra filesystem types for delayed
### Basic network and firewall/security options: ###
hostname="" # Set this!
nisdomainname="NO" # Set to NIS domain if using NIS (or NO).
-dhcp_program="/sbin/dhclient" # Path to dhcp client program.
-dhcp_flags="" # Additional flags to pass to dhcp client.
+dhclient_program="/sbin/dhclient" # Path to dhcp client program.
+dhclient_flags="" # Additional flags to pass to dhcp client.
firewall_enable="NO" # Set to YES to enable firewall functionality
firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall
firewall_type="UNKNOWN" # Firewall type (see /etc/rc.firewall)
diff --git a/etc/rc.d/dhclient b/etc/rc.d/dhclient
index d296825da619..160b9b2c4acb 100755
--- a/etc/rc.d/dhclient
+++ b/etc/rc.d/dhclient
@@ -17,7 +17,6 @@
. /etc/network.subr
name="dhclient"
-command="/sbin/${name}"
pidfile="/var/run/${name}.pid"
case "${OSTYPE}" in
FreeBSD)
@@ -27,6 +26,7 @@ FreeBSD)
;;
NetBSD)
rcvar=$name
+ command="/sbin/${name}"
;;
esac
@@ -41,7 +41,7 @@ dhclient_prestart()
ifscript_up ${ifn}
done
- rc_flags="${rc_flags} ${dhcp_flags} ${dhcp_list}"
+ rc_flags="${rc_flags} ${dhcp_list}"
return 0
}
diff --git a/etc/rc.subr b/etc/rc.subr
index 1f21f221f558..52831805b882 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -837,6 +837,8 @@ load_rc_config()
[ -n "$xntpd_enable" ] && ntpd_enable="$xntpd_enable"
[ -n "$xntpd_program" ] && ntpd_program="$xntpd_program"
[ -n "$xntpd_flags" ] && ntpd_flags="$xntpd_flags"
+ [ -n "$dhcp_program" ] && dhclient_program="$dhcp_program"
+ [ -n "$dhcp_flags" ] && dhclient_flags="$dhcp_flags"
;;
esac