From owner-freebsd-wireless@FreeBSD.ORG Mon Apr 18 11:37:40 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0134610656EF for ; Mon, 18 Apr 2011 11:37:40 +0000 (UTC) (envelope-from freebsd@psconsult.nl) Received: from mx1.psconsult.nl (unknown [IPv6:2001:7b8:30f:e0::5059:ee8a]) by mx1.freebsd.org (Postfix) with ESMTP id 533A48FC1A for ; Mon, 18 Apr 2011 11:37:36 +0000 (UTC) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.psconsult.nl (8.14.4/8.14.4) with ESMTP id p3IBbT79077933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 18 Apr 2011 13:37:34 +0200 (CEST) (envelope-from freebsd@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.4/8.14.4/Submit) id p3IBbTPm077932 for freebsd-wireless@freebsd.org; Mon, 18 Apr 2011 13:37:29 +0200 (CEST) (envelope-from freebsd@psconsult.nl) X-Authentication-Warning: mx1.psconsult.nl: paul set sender to freebsd@psconsult.nl using -f Date: Mon, 18 Apr 2011 13:37:29 +0200 From: Paul Schenkeveld To: freebsd-wireless@freebsd.org Message-ID: <20110418113729.GA77340@psconsult.nl> References: <201104170909.44508.bschmidt@freebsd.org> <201104171605.59340.bschmidt@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: RFC: supporting multiple hostap instances in /etc/rc.conf X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 11:37:40 -0000 On Sun, Apr 17, 2011 at 10:19:21PM +0800, Adrian Chadd wrote: > On 17 April 2011 22:05, Bernhard Schmidt 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__pidfile and hostapd__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