From ed73fba46289f4af60422b2d267ba40834ca97ca Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 25 May 2013 20:50:49 +0200 Subject: add plugins folder --- usr/lib/autowifi/plugins/00profile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 usr/lib/autowifi/plugins/00profile (limited to 'usr/lib/autowifi/plugins/00profile') diff --git a/usr/lib/autowifi/plugins/00profile b/usr/lib/autowifi/plugins/00profile new file mode 100755 index 00000000..fe42470b --- /dev/null +++ b/usr/lib/autowifi/plugins/00profile @@ -0,0 +1,8 @@ +#!/bin/sh +#ESSID MAC CHANNEL ENCRYPTION WPA WPA2 +cat /etc/autowifi/wifi_keys | (while IFS='|' read SSID MAC KEY; do + if [ "$1" == "$SSID" -a "$2" == "$MAC" ]; then + echo $KEY + exit 0 + fi +done; exit 1) -- cgit v1.2.3 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/00profile') 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 From 20b1c6c2158fb12b6422c170d4a2a0f402864308 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 10 Jun 2013 20:30:41 +0200 Subject: finish refactoring new wpa_supplicant autowifi --- usr/lib/autowifi/plugins/00profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/lib/autowifi/plugins/00profile') diff --git a/usr/lib/autowifi/plugins/00profile b/usr/lib/autowifi/plugins/00profile index fdba2c9e..d7fb9c75 100755 --- a/usr/lib/autowifi/plugins/00profile +++ b/usr/lib/autowifi/plugins/00profile @@ -3,7 +3,7 @@ # ENV: # root (default: /) root=${root:-/} -cat $root/etc/autowifi/wifi_keys 2>/dev/null | (while IFS='|' read SSID MAC KEY; do +cat $root/etc/autowifi/wifi_keys 2>/dev/null | (while IFS='|' read SSID MAC BANDWIDTH KEY; do if [ "$1" == "$SSID" -a "$2" == "$MAC" ]; then echo $KEY exit 0 -- cgit v1.2.3