From 7ce1278d7b014787472cb2ef35146888af0b7060 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 11 Jan 2018 13:48:27 -0500 Subject: [PATCH 1/2] fix iiab-startup.sh when hostapd_enabled = False (bash syntax/comment error) --- roles/2-common/templates/iiab-startup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/2-common/templates/iiab-startup.sh b/roles/2-common/templates/iiab-startup.sh index 8e99b0f92..595099799 100644 --- a/roles/2-common/templates/iiab-startup.sh +++ b/roles/2-common/templates/iiab-startup.sh @@ -9,13 +9,13 @@ fi # Set wlan0 to promiscuous on boot if needed as gateway (i.e. AP's OFF) # Scripts iiab-hotspot-on + iiab-hotspot-off SHOULD toggle this boot flag! # https://github.com/iiab/iiab/issues/638#issuecomment-355455454 -if [[ $(grep -i raspbian /etc/*release) && +if [[ $(grep -i raspbian /etc/*release) && \ #($(grep "hostapd_enabled = False" /etc/iiab/config_vars.yml) || #((! $(grep "hostapd_enabled = True" /etc/iiab/config_vars.yml)) && - $(grep "^hostapd_enabled = False" /etc/iiab/iiab.ini) + $(grep "^hostapd_enabled = False" /etc/iiab/iiab.ini) ]]; #) #) - ]]; + #]]; then ip link set dev wlan0 promisc on fi From 1178c452a7cf47e7f9f7f9e78c3205085f292f4d Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 11 Jan 2018 13:51:22 -0500 Subject: [PATCH 2/2] backslash not needed (in bash conditional) --- roles/2-common/templates/iiab-startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/2-common/templates/iiab-startup.sh b/roles/2-common/templates/iiab-startup.sh index 595099799..0b2cf5db9 100644 --- a/roles/2-common/templates/iiab-startup.sh +++ b/roles/2-common/templates/iiab-startup.sh @@ -9,7 +9,7 @@ fi # Set wlan0 to promiscuous on boot if needed as gateway (i.e. AP's OFF) # Scripts iiab-hotspot-on + iiab-hotspot-off SHOULD toggle this boot flag! # https://github.com/iiab/iiab/issues/638#issuecomment-355455454 -if [[ $(grep -i raspbian /etc/*release) && \ +if [[ $(grep -i raspbian /etc/*release) && #($(grep "hostapd_enabled = False" /etc/iiab/config_vars.yml) || #((! $(grep "hostapd_enabled = True" /etc/iiab/config_vars.yml)) && $(grep "^hostapd_enabled = False" /etc/iiab/iiab.ini) ]];