Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jul 2011 09:43:49 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        freebsd-rc@freebsd.org
Subject:   RFC: patches for /etc/rc.d/bridge and /etc/rc.d/hostapd
Message-ID:  <CAFPOs6oHa6NPOHrakDF5EEGfOCau54AP7=RLBFN7jKJumm-%2BBQ@mail.gmail.com>

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

[-- Attachment #1 --]
Hello,

would anyone object to the following couple of patches? first one is
for /etc/rc.d/bridge to automatically bring bridged interface up, and,
another one is for hostapd to have support for multiple configuration
files.

thanks,
max

[-- Attachment #2 --]
--- etc/rc.d/bridge.orig	2011-07-01 10:06:50.000000000 +0400
+++ etc/rc.d/bridge	2011-07-06 13:41:51.000000000 +0400
@@ -52,6 +52,9 @@
 	if [ -n "${interfaces}" ]; then
 		for i in ${interfaces}; do
 			if glob_int $iface $i ; then
+				if [ "$cmd" = "addm" ]; then
+					ifconfig $iface up > /dev/null 2>&1
+				fi
 				ifconfig $bridge $cmd $iface > /dev/null 2>&1
 				return
 			fi

[-- Attachment #3 --]
--- etc/rc.d/hostapd.orig	2009-08-03 12:13:06.000000000 +0400
+++ etc/rc.d/hostapd	2011-07-06 14:37:43.000000000 +0400
@@ -13,13 +13,13 @@
 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}"
+load_rc_config ${name}
+hostapd_conf=${hostapd_conf:="/etc/${name}.conf"}
+command_args="-P ${pidfile} -B ${hostapd_conf}"
+required_files="${hostapd_conf}"
 required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp"
 extra_commands="reload"
 
-load_rc_config ${name}
 run_rc_command "$1"

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFPOs6oHa6NPOHrakDF5EEGfOCau54AP7=RLBFN7jKJumm-%2BBQ>