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>
This commit is contained in:
parent
a1a9b44569
commit
d679c13014
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -254,13 +254,13 @@ Note that this requires that the kernel have been compiled with
|
||||
The NIS domain name of this host, or
|
||||
.Dq Li NO
|
||||
if NIS is not used.
|
||||
.It Va dhcp_program
|
||||
.It Va dhclient_program
|
||||
.Pq Vt str
|
||||
Path to the DHCP client program
|
||||
.Pa ( /sbin/dhclient ,
|
||||
the ISC DHCP client,
|
||||
is the default).
|
||||
.It Va dhcp_flags
|
||||
.It Va dhclient_flags
|
||||
.Pq Vt str
|
||||
Additional flags to pass to the DHCP client program.
|
||||
For the ISC DHCP client, see the
|
||||
|
Loading…
x
Reference in New Issue
Block a user