소스 검색

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}