summaryrefslogtreecommitdiffstats
path: root/usr/lib/autowifi
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-05-26 14:09:11 +0200
committermakefu <github@syntax-fehler.de>2013-05-26 14:09:11 +0200
commit55d6402ac5307af7490a6c6d0607c2b20c68afa4 (patch)
treee5d0e6966cf9682b92f1c3ebcc26c172b69e9749 /usr/lib/autowifi
parent5995257992d9b4d86313e3d78a85b68ffff0a2af (diff)
update parser
Diffstat (limited to 'usr/lib/autowifi')
-rw-r--r--usr/lib/autowifi/lib/core9
-rwxr-xr-xusr/lib/autowifi/plugins/11belkin_wps2
2 files changed, 10 insertions, 1 deletions
diff --git a/usr/lib/autowifi/lib/core b/usr/lib/autowifi/lib/core
new file mode 100644
index 00000000..f41de225
--- /dev/null
+++ b/usr/lib/autowifi/lib/core
@@ -0,0 +1,9 @@
+parse_plugin_args(){
+ # convenience function to put args in ENV variables
+ ESSID="$1"
+ MAC="$2"
+ CHANNEL="$3"
+ ENC="$4"
+ WPA="$5"
+ WPA2="$6"
+}
diff --git a/usr/lib/autowifi/plugins/11belkin_wps b/usr/lib/autowifi/plugins/11belkin_wps
index 93dd447a..3820cf2e 100755
--- a/usr/lib/autowifi/plugins/11belkin_wps
+++ b/usr/lib/autowifi/plugins/11belkin_wps
@@ -13,7 +13,7 @@
cd $(dirname $(readlink -f $0))
. ../lib/core
. ../lib/wps
-parse_args $@
+parse_plugin_args $@
MAC=$(printf "%s" $2| sed 's/://g')
if [ ${#MAC} -ne 12 ] ;then