Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2005 18:32:31 +0200
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        Brooks Davis <brooks@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/etc devd.conf network.subr pccard_ether src/etc/defaults rc.conf src/etc/rc.d dhclient netif
Message-ID:  <20050607163231.GY41050@obiwan.tataz.chchile.org>
In-Reply-To: <20050607093723.GT41050@obiwan.tataz.chchile.org>
References:  <200506070449.j574nCXU061621@repoman.freebsd.org> <20050607093723.GT41050@obiwan.tataz.chchile.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--jy6Sn24JjFx/iggw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Brooks,

> On Tue, Jun 07, 2005 at 04:49:12AM +0000, Brooks Davis wrote:
> > brooks      2005-06-07 04:49:12 UTC
> > 
> >   FreeBSD src repository
> > 
> >   Modified files:
> >     etc                  devd.conf network.subr pccard_ether 
> >     etc/defaults         rc.conf 
> >     etc/rc.d             dhclient netif 
> >   Log:
> >   Support code for the OpenBSD dhclient.  This significantly changes the
> >   way interfaces are configured.  Some key points:
> >   
> >     - At startup, all interfaces are configured through /etc/rc.d/netif.
> >     - ifconfig_<if> variables my now mix real ifconfig commands the with
> >       DHCP and WPA directives.  For example, this allows media
> >       configuration prior to running dhclient.
> >     - /etc/rc.d/dhclient is not run at startup except by netif to start
> >       dhclient on specific interfaces.
> >     - /etc/pccard_ether calls "/etc/rc.d/netif start <if>" to do most of
> >       it's work.
> >     - /etc/pccard_ether no longer takes additional arguments to pass to
> >       ifconfig.  Instead, ifconfig_<if> variables are now honored in favor
> >       of pccard_ifconfig when available.
> >     - /etc/pccard_ether will only run on interfaces specified in
> >       removable_interfaces, even if pccard_ifconfig is set.
> 
> I know this is maybe a ill-timed remark, but this requires modification
> in the manual pages.  Is there upcoming work on this ?  Do you need
> help ?

I dare to submit two patches.  The first one just removes
$pccard_ether_delay from etc/defaults/rc.conf, as it is no longer used.

The second one tries to update the rc.conf(5) manual page with the
following changes :

	- Update the $ifconfig_<interface> description to handle the
	  changes you describe above (especially WPA and link mode
	  options in this variable).
	- Make a more correct description of $pccard_ifconfig according
	  to the existing code.
	- Add a precision in the description of $removable_interfaces.
	- Removes the description of $pccard_ether_delay.

I don't pretend that this is absolutely correct, feel free to modify it
your own manner or even drop it.

Best regards,
-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >

--jy6Sn24JjFx/iggw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="default_rc.conf.patch"

Index: defaults/rc.conf
===================================================================
RCS file: /nfs/donald/repo/FreeBSD/src/etc/defaults/rc.conf,v
retrieving revision 1.249
diff -u -r1.249 rc.conf
--- defaults/rc.conf	7 Jun 2005 04:49:12 -0000	1.249
+++ defaults/rc.conf	7 Jun 2005 15:05:24 -0000
@@ -38,7 +38,6 @@
 pccard_ifconfig="NO"	# Specialized pccard ethernet configuration (or NO).
 pccardd_flags="-z"	# Additional flags for pccardd.
 pccard_conf="/etc/defaults/pccard.conf"	# pccardd(8) config file
-pccard_ether_delay="5"	# Delay before trying to start dhclient in pccard_ether
 powerd_enable="NO" 	# Run powerd to lower our power usage.
 powerd_flags=""		# Flags to powerd (if enabled).
 removable_interfaces=""	# Removable network interfaces for /etc/pccard_ether.

--jy6Sn24JjFx/iggw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="rc.conf.5.patch"

Index: rc.conf.5
===================================================================
RCS file: /nfs/donald/repo/FreeBSD/src/share/man/man5/rc.conf.5,v
retrieving revision 1.252
diff -u -r1.252 rc.conf.5
--- rc.conf.5	1 May 2005 08:34:01 -0000	1.252
+++ rc.conf.5	7 Jun 2005 16:23:22 -0000
@@ -178,14 +178,14 @@
 for the default value.
 .It Va pccard_ifconfig
 .Pq Vt str
-List of arguments to be passed to
-.Xr ifconfig 8
-at boot time or on
-insertion of the card (e.g.\&
-.Dq Cm inet Li 192.168.1.1 Cm netmask Li 255.255.255.0
-for a fixed address or
-.Dq Li DHCP
-for a DHCP client).
+This variable has the same format as the
+.Va ifconfig_ Ns Aq Ar interface
+variable (see
+.Va network_interfaces
+below).  It is used as a fallback variable when there is no
+.Va ifconfig_ Ns Aq Ar interface
+is defined and only if the interface name is listed in
+.Va removable_interfaces .
 .It Va pccard_beep
 .Pq Vt int
 If 0,
@@ -209,18 +209,6 @@
 these are the flags to pass to the
 .Xr pccardd 8
 daemon.
-.It Va pccard_ether_delay
-.Pq Vt str
-Set the delay before starting
-.Xr dhclient 8
-in the
-.Pa /etc/pccard_ether
-script.
-This defaults to 5 seconds to work around a bug in the
-.Xr ed 4
-driver which can lead to system hangs when using some newer
-.Xr ed 4
-based cards.
 .It Va powerd_enable
 .Pq Vt bool
 If set to
@@ -241,6 +229,9 @@
 .Pq Vt str
 List of removable network interfaces to be supported by
 .Pa /etc/pccard_ether .
+This also determines which interfaces will be able to use the
+.Va pccard_ifconfig
+fallback variable.
 .It Va tmpmfs
 Controls the creation of a
 .Pa /tmp
@@ -965,11 +956,11 @@
 .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n
 variables.
 .Pp
-It is possible to bring up an interface with DHCP by setting the
+It is possible to bring up an interface with DHCP by adding
+.Dq Li DHCP
+to the
 .Va ifconfig_ Ns Aq Ar interface
-variable to
-.Dq Li DHCP .
-For instance, to initialize the
+variable. For instance, to initialize the
 .Li ed0
 device via DHCP,
 it is possible to use something like:
@@ -977,6 +968,24 @@
 ifconfig_ed0="DHCP"
 .Ed
 .Pp
+Also, if your interface needs WPA authentication, it is possible
+to add
+.Dq Li WPA
+to the
+.Va ifconfig_ Ns Aq Ar interface
+variable.
+.Pp
+Finally, you can add
+.Xr ifconfig 8
+link layer options in this variable, in addition to the
+.Pa /etc/start_if. Ns Aq Ar interface
+file. For instance, to initialize the
+.Li wi0
+device via DHCP, using WPA authentication and 802.11b
+mode, it is possible to use something like:
+.Bd -literal
+ifconfig_wi0="DHCP WPA mode 11b"
+.Pp
 It is also possible to rename interface by doing:
 .Bd -literal
 ifconfig_ed0_name="net0"

--jy6Sn24JjFx/iggw--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050607163231.GY41050>