From 2805e6eb6dc2b95129a79ae3942dc579d5834269 Mon Sep 17 00:00:00 2001 From: randyoo Date: Fri, 6 Jul 2018 11:09:57 -0600 Subject: [PATCH] support secondary (or more) wlan interfaces patch installer.sh with /etc/sudoer commands that support wlan1 - wlan9. --- installers/common.sh | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index 23275cc6..0de8cf49 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -223,15 +223,11 @@ function patch_system_files() { "/sbin/ifdown" "/sbin/ifup" "/bin/cat /etc/wpa_supplicant/wpa_supplicant.conf" - "/bin/cat /etc/wpa_supplicant/wpa_supplicant-wlan0.conf" - "/bin/cat /etc/wpa_supplicant/wpa_supplicant-wlan1.conf" + "/bin/cat /etc/wpa_supplicant/wpa_supplicant-wlan[0-9].conf" "/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant.conf" - "/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant-wlan0.conf" - "/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant-wlan1.conf" - "/sbin/wpa_cli -i wlan0 scan_results" - "/sbin/wpa_cli -i wlan0 scan" - "/sbin/wpa_cli -i wlan1 scan_results" - "/sbin/wpa_cli -i wlan1 scan" + "/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant-wlan[0-9].conf" + "/sbin/wpa_cli -i wlan[0-9] scan_results" + "/sbin/wpa_cli -i wlan[0-9] scan" "/sbin/wpa_cli reconfigure" "/bin/cp /tmp/hostapddata /etc/hostapd/hostapd.conf" "/etc/init.d/hostapd start" @@ -241,12 +237,9 @@ function patch_system_files() { "/bin/cp /tmp/dhcpddata /etc/dnsmasq.conf" "/sbin/shutdown -h now" "/sbin/reboot" - "/sbin/ip link set wlan0 down" - "/sbin/ip link set wlan0 up" - "/sbin/ip -s a f label wlan0" - "/sbin/ip link set wlan1 down" - "/sbin/ip link set wlan1 up" - "/sbin/ip -s a f label wlan1" + "/sbin/ip link set wlan[0-9] down" + "/sbin/ip link set wlan[0-9] up" + "/sbin/ip -s a f label wlan[0-9]" "/bin/cp /etc/raspap/networking/dhcpcd.conf /etc/dhcpcd.conf" "/etc/raspap/hostapd/enablelog.sh" "/etc/raspap/hostapd/disablelog.sh"