Преглед изворни кода

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}