From 55d6402ac5307af7490a6c6d0607c2b20c68afa4 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 26 May 2013 14:09:11 +0200 Subject: update parser --- usr/lib/autowifi/lib/core | 9 +++++++++ usr/lib/autowifi/plugins/11belkin_wps | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 usr/lib/autowifi/lib/core (limited to 'usr/lib/autowifi') 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 -- cgit v1.2.3