diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index 42eb966..9c7f6c9 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -81,7 +81,7 @@ else rm -f "$sectorcopy" # always delete: no broadcast for isolated device rm -f "$sectortmp" - if ! wifiDelAll; then + if ! wifiDelIface; then echo "Can't delete current wifi setup" exit 1 fi @@ -181,7 +181,7 @@ if [ -s "$hoodfile" ]; then uci -q set "system.@system[0].hood=$hood" uci -q commit system - if ! wifiDelAll; then + if ! wifiDelIface; then echo "Can't delete current wifi setup" exit 1 fi diff --git a/src/packages/fff/fff-wireless/files/lib/functions/fff/wireless b/src/packages/fff/fff-wireless/files/lib/functions/fff/wireless index b1ff5a9..5b63397 100644 --- a/src/packages/fff/fff-wireless/files/lib/functions/fff/wireless +++ b/src/packages/fff/fff-wireless/files/lib/functions/fff/wireless @@ -14,6 +14,21 @@ wifiDelAll() { return 0 } +wifiDelIface() { + if [ $# -ne "0" ] + then + echo "Usage: wifiDelIface" + return 1 + fi + + grep 'config wifi-iface' /etc/config/wireless | sed -n -e "s/.*'\([^']*\)'.*/\1/p" | while read -r line ; do + uci -q delete "wireless.$line" + done + uci -q commit wireless + + return 0 +} + wifiAddPhy() { if [ $# -ne "2" ] then