diff options
author | makefu <github@syntax-fehler.de> | 2013-05-29 20:38:06 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-05-29 20:38:06 +0200 |
commit | abaa9eaccbfd4517df7a92c251818383ed752caf (patch) | |
tree | abe9b1e5d4dcd84accdede2c990bfdfdad5e93f1 /usr/lib/autowifi/plugins/00profile | |
parent | b292dfe3dea7affa29e526c1328613f6e5ca8ed4 (diff) |
00profile takes root env param
Diffstat (limited to 'usr/lib/autowifi/plugins/00profile')
-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 |