summaryrefslogtreecommitdiffstats
path: root/usr/lib/autowifi/plugins/00profile
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-05-29 20:38:06 +0200
committermakefu <github@syntax-fehler.de>2013-05-29 20:38:06 +0200
commitabaa9eaccbfd4517df7a92c251818383ed752caf (patch)
treeabe9b1e5d4dcd84accdede2c990bfdfdad5e93f1 /usr/lib/autowifi/plugins/00profile
parentb292dfe3dea7affa29e526c1328613f6e5ca8ed4 (diff)
00profile takes root env param
Diffstat (limited to 'usr/lib/autowifi/plugins/00profile')
-rwxr-xr-xusr/lib/autowifi/plugins/00profile5
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