RFC: supporting multiple hostap instances in /etc/rc.conf
Paul Schenkeveld
freebsd at psconsult.nl
Mon Apr 18 11:37:40 UTC 2011
On Sun, Apr 17, 2011 at 10:19:21PM +0800, Adrian Chadd wrote:
> On 17 April 2011 22:05, Bernhard Schmidt <bschmidt at freebsd.org> wrote:
>
>
> > Way to complex for my taste :)
> >
> > How about
> >
> > hostapd_enable="YES"
> > hostapd_interfaces="wlan0 wlan1 .." # defaults to empty
> >
> > and then
> >
> > if [ -n $hostapd_interfaces ]; then
> > for interface in $interface; do
> > pidfile=/var/run/hostapd/$interface.pid
> > conffile=/etc/hostapd-$interface.conf
> > ..
> > done
> > else
> > pidfile=/var/run/hostapd.pid
> > conffile=/etc/hostapd.conf
> > fi
> >
> >
> That sounds fine. Shall we submit a patch to the hostapd rc.d script to
> implement that functionality?
Please go for it! I had something cooked up here locally but not nearly
as nice :(
I like the idea of just specifying the interface and let the script
derive hostapd_<instance>_pidfile and hostapd_<instance>_conffile from
the interface but perhaps you could create these intermediate variables
and allow them to be overruled in /etc/rc.conf{,.local}.
Paul Schenkeveld
More information about the freebsd-wireless
mailing list