From abaa9eaccbfd4517df7a92c251818383ed752caf Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 29 May 2013 20:38:06 +0200 Subject: 00profile takes root env param --- usr/lib/autowifi/plugins/00profile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr/lib/autowifi/plugins') 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 -- cgit v1.2.3