瀏覽代碼

package/base-files: wireless: support appending to hostapd.conf

This is useful for adding additional (virtual) access points. In my
setup, /etc/hostapd.conf.post contains:

| bss=ath6
| ssid=IPv6XS4all

In /etc/network/interfaces, there is a standard entry for ath6 which
defines the IP address.

Maybe this could be implemented in a cleaner way by introducing a
'wireless-master' setting which points to the real wireless interface
(wlan0 in my case), so ifup knows which hostapd.conf file to add the
settings to.
Phil Sutter 10 年之前
父節點
當前提交
16a4e90120
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      package/base-files/src/etc/network/if-pre-up.d/04-wireless

+ 2 - 0
package/base-files/src/etc/network/if-pre-up.d/04-wireless

@@ -78,6 +78,8 @@ case "$IF_WIRELESS_MODE" in
 			echo "rsn_pairwise=CCMP" >> /tmp/hostapd.conf
 			echo "wpa_passphrase=$IF_WIRELESS_PASSPHRASE" >> /tmp/hostapd.conf
 		}
+		[ -f /etc/hostapd.conf.post ] && \
+			cat /etc/hostapd.conf.post >> /tmp/hostapd.conf
 		;;
 	sta)
 		ip link set up dev ${IFACE}