diff options
-rwxr-xr-x | usr/lib/autowifi/plugins/00profile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/lib/autowifi/plugins/00profile b/usr/lib/autowifi/plugins/00profile index fe42470b..fdba2c9e 100755 --- a/usr/lib/autowifi/plugins/00profile +++ b/usr/lib/autowifi/plugins/00profile @@ -1,6 +1,9 @@ #!/bin/sh #ESSID MAC CHANNEL ENCRYPTION WPA WPA2 -cat /etc/autowifi/wifi_keys | (while IFS='|' read SSID MAC KEY; do +# ENV: +# root (default: /) +root=${root:-/} +cat $root/etc/autowifi/wifi_keys 2>/dev/null | (while IFS='|' read SSID MAC KEY; do if [ "$1" == "$SSID" -a "$2" == "$MAC" ]; then echo $KEY exit 0 |