From owner-freebsd-bugs@FreeBSD.ORG Fri Jan 22 10:30:05 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0318A1065672 for ; Fri, 22 Jan 2010 10:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D37A28FC14 for ; Fri, 22 Jan 2010 10:30:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MAU499029158 for ; Fri, 22 Jan 2010 10:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0MAU4xa029149; Fri, 22 Jan 2010 10:30:04 GMT (envelope-from gnats) Resent-Date: Fri, 22 Jan 2010 10:30:04 GMT Resent-Message-Id: <201001221030.o0MAU4xa029149@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matthias Meyser Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC57C1065670 for ; Fri, 22 Jan 2010 10:24:23 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id BAA388FC0C for ; Fri, 22 Jan 2010 10:24:23 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MAOMuB092382 for ; Fri, 22 Jan 2010 10:24:23 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o0MAOMof092370; Fri, 22 Jan 2010 10:24:22 GMT (envelope-from nobody) Message-Id: <201001221024.o0MAOMof092370@www.freebsd.org> Date: Fri, 22 Jan 2010 10:24:22 GMT From: Matthias Meyser To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: conf/143079: hostapd startup missing multi wlan functionality X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 10:30:05 -0000 >Number: 143079 >Category: conf >Synopsis: hostapd startup missing multi wlan functionality >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jan 22 10:30:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Matthias Meyser >Release: FreeBSD 8-stable >Organization: XeNEt GmbH >Environment: FreeBSD wlan00.xenet.de 8.0-STABLE FreeBSD 8.0-STABLE #0: Thu Jan 14 20:04:44 CET 2010 root@intserv1.intern:/usr/obj/usr/src/sys/GATE i386 >Description: Hostapd itself can handle more than one wlan by using more than one configfile. At the moment there ist only one hardcodeds configfile. With the attached patch one or more configfiles can be set in rc.conf. Default ist the original configfile. >How-To-Repeat: >Fix: see patch Patch attached with submission follows: --- usr/src/etc/defaults/rc.conf.orig 2010-01-22 10:58:00.000000000 +0100 +++ usr/src/etc/defaults/rc.conf 2010-01-22 11:05:22.000000000 +0100 @@ -239,6 +239,8 @@ ### Network daemon (miscellaneous) ### hostapd_enable="NO" # Run hostap daemon. +hostapd_config="/etc/hostapd.conf" # Path to the configuration file +#hostapd_config="/etc/hostapd.conf.wlan0 /etc/hostapd.conf.wlan1" # Dual WLAN config syslogd_enable="YES" # Run syslog daemon (or NO). syslogd_program="/usr/sbin/syslogd" # path to syslogd, if you want a different one. syslogd_flags="-s" # Flags to syslogd (if enabled). --- usr/src/etc/rc.d/hostapd.orig 2010-01-22 10:57:14.000000000 +0100 +++ usr/src/etc/rc.d/hostapd 2010-01-22 10:56:21.000000000 +0100 @@ -11,15 +11,14 @@ name="hostapd" command="/usr/sbin/${name}" -rcvar=`set_rcvar` - -conf_file="/etc/${name}.conf" pidfile="/var/run/${name}.pid" - -command_args="-P ${pidfile} -B ${conf_file}" -required_files="${conf_file}" +rcvar=`set_rcvar` required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp" + +load_rc_config $name +config="${hostapd_config:-/etc/${name}.conf}" +command_args="-P ${pidfile} -B ${config}" +required_files="${config}" extra_commands="reload" -load_rc_config ${name} run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: