Last active
August 15, 2018 09:36
-
-
Save dan82840/af30b688c62590c07a538973bdb2abf7 to your computer and use it in GitHub Desktop.
test-oap-state.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
. /lib/oap/uci.sh | |
_foreach_wifi_iface_cb() { | |
local section=$1 | |
local ifname=$(oap_state_get wireless.$section.ifname) | |
local ssid=$(oap_state_get wireless.$section.ssid) | |
echo "$section:<$ifname>:$ssid" | |
oap_state_set wireless.$section.section $section | |
oap_state_del wireless.$section.section | |
} | |
main() { | |
oap_state_foreach wireless wifi-iface _foreach_wifi_iface_cb | |
} | |
main | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.