Date: Sun, 17 Apr 2011 16:05:58 +0200 From: Bernhard Schmidt <bschmidt@freebsd.org> To: Adrian Chadd <adrian.chadd@gmail.com> Cc: freebsd-wireless@freebsd.org Subject: Re: RFC: supporting multiple hostap instances in /etc/rc.conf Message-ID: <201104171605.59340.bschmidt@freebsd.org> In-Reply-To: <BANLkTimFRR2TE%2BH5Vop%2BTYms8mP4p4FPBg@mail.gmail.com> References: <BANLkTikGsV7AMYG7GaJ5BN7yUKgugN%2BfBg@mail.gmail.com> <201104170909.44508.bschmidt@freebsd.org> <BANLkTimFRR2TE%2BH5Vop%2BTYms8mP4p4FPBg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 17 April 2011 15:25:55 Adrian Chadd wrote: > On 17 April 2011 15:09, Bernhard Schmidt <bschmidt@freebsd.org> wrote: > > > > Given that hostapd needs to be started with a configuration file as an > > argument and not an interface like wpa_supplicant you need to add a way > > to add multiple configuration files. The conf_file variable is > > currently hard-coded to /etc/hostapd.conf, if you add another one like > > hostapd_conf_files="" and iterate over it, that should do the trick. > > > > But I'm not sure how to handle the pidfile, or how to name it.. > > > > I was thinking of say: > > hostapd_instances="a b c" > hostapd_a_conf="/etc/hostapd.wlan0.conf" > hostapd_a_flags="-B -p /var/run/hostapd.wlan0.pid" > hostapd_a_cmd="/usr/sbin/hostapd" > > hostapd_b_conf="/etc/hostapd.wlan1.conf" > hostapd_b_flags="-B -p /var/run/hostapd.wlan1.pid" > hostapd_b_cmd="/usr/sbin/hostapd" > > It's not terribly automagic, but it'll work well enough to run multiple > hostapds. > > How's that sound? 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 -- Bernhard
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104171605.59340.bschmidt>
