diff --git a/roles/network/templates/hostapd/iiab-test-wifi.j2 b/roles/network/templates/hostapd/iiab-test-wifi.j2 index e358d4dbb..39ae8caa8 100755 --- a/roles/network/templates/hostapd/iiab-test-wifi.j2 +++ b/roles/network/templates/hostapd/iiab-test-wifi.j2 @@ -29,14 +29,14 @@ fi if [ -f /run/netplan/wpa-$IFACE.conf ]; then SSID=`grep ssid /run/netplan/wpa-$IFACE.conf | awk -F = '{print $2}' | sed -r s/\"// | sed -r s/\"//` REG_DOM=$(grep country /run/netplan/wpa-$IFACE.conf | awk -F = '{ print $2 }') + NETPLAN=1 if [ -z "$REG_DOM" ]; then - NETPLAN=1 echo "cover netplan wifi client lack of country=" - sed -i 's|ctrl_interface=/run/wpa_supplicant|&\ncountry={{ host_country_code }}|' /run/netplan/wpa-$IFACE.conf + sed -i "s|ctrl_interface=/run/wpa_supplicant|&\ncountry={{ host_country_code }}|" /run/netplan/wpa-$IFACE.conf else echo "set hostapd wifi country to $REG_DOM" if [ -f /etc/hostapd/hostapd.conf.iiab ]; then - sed -i 's|^country.*|country=$REG_DOM|' /etc/hostapd/hostapd.conf.iiab + sed -i "s|^country.*|country_code=$REG_DOM|" /etc/hostapd/hostapd.conf.iiab cp /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf fi fi diff --git a/roles/network/templates/hostapd/netd-disp2 b/roles/network/templates/hostapd/netd-disp2 index 78e258627..7b9218899 100644 --- a/roles/network/templates/hostapd/netd-disp2 +++ b/roles/network/templates/hostapd/netd-disp2 @@ -13,6 +13,9 @@ if [ "$IFACE" == "{{ discovered_wireless_iface }}" ]; then systemctl stop wpa_supplicant systemctl restart hostapd systemctl start wpa_supplicant + if [ -f /run/netplan/wpa-wlan0.conf ]; then + systemctl restart netplan-wpa-wlan0.service + fi else echo "Upstream Channel greater than 13 or is the same - not changing hostapd.conf" fi