cvs commit: src/etc network.subr
jhb at freebsd.org
Thu Mar 29 20:39:19 UTC 2007
On Thursday 29 March 2007 03:58:57 pm Andrey Chernov wrote:
> On Thu, Mar 29, 2007 at 03:34:45PM -0400, John Baldwin wrote:
> > The change in v1.28 fixed a similar warning where you'd get something like
> > /etc/rc.d/dhclient: WARNING: $background_dhclient_bge0 is not set properly
> > (where bge0 is an interface name). 1.28 fixed the warning for me, but I
> > use background_dhclient and have none of the variables set. Maybe Andrey
> > seeing a warning in the non-default case when a variable is set?
> I have plain DHCP and don't use background_dhclient too. I wonder why
> somebody have not see it. Look at this lines from v1.28:
> background_dhclient=`get_if_var $ifn background_dhclient_IF
> if checkyesno background_dhclient; then
> Since background_dhclient_fxp0="" automatically set earlier,
> background_dhclient evaluates to "" too.
> Then checkyesno background_dhclient produces this warning.
Where are you seeing background_dhclient_fxp0 being set?
Oh, that's a bug in /etc/defaults/rc.conf I think. It shuoldn't have that
entry set, or it should be set to either YES or NO, not empty. So, you have
to have 'fxp0' to see this warning. The setting of 'dhclient_flags_fxp0' is
also bogus. I think these are intended to be examples in which case they
should be commented out like other examples in this file. I think this is
the better fix, and that your network.subr change should be reverted:
RCS file: /usr/cvs/src/etc/defaults/rc.conf,v
retrieving revision 1.306
diff -u -r1.306 rc.conf
--- rc.conf 6 Mar 2007 13:13:53 -0000 1.306
+++ rc.conf 29 Mar 2007 20:36:44 -0000
@@ -93,9 +93,9 @@
nisdomainname="NO" # Set to NIS domain if using NIS (or NO).
dhclient_program="/sbin/dhclient" # Path to dhcp client program.
dhclient_flags="" # Extra flags to pass to dhcp client.
-dhclient_flags_fxp0="" # Extra dhclient flags for fxp0 only
+#dhclient_flags_fxp0="" # Extra dhclient flags for fxp0 only
background_dhclient="NO" # Start dhcp client in the background.
-background_dhclient_fxp0="" # Start dhcp client on fxp0 in the background.
+#background_dhclient_fxp0="YES" # Start dhcp client on fxp0 in the
synchronous_dhclient="YES" # Start dhclient directly on configured
# interfaces during startup.
firewall_enable="NO" # Set to YES to enable firewall functionality
Having pppoed_interface default to fxp0 is also likely a bug. It should
probably be unset, and the rc.d script should require it to be set if pppoed
More information about the cvs-src