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/30default_wps | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'usr/lib/autowifi/plugins/30default_wps') diff --git a/usr/lib/autowifi/plugins/30default_wps b/usr/lib/autowifi/plugins/30default_wps index 98be6a66..7f66d117 100755 --- a/usr/lib/autowifi/plugins/30default_wps +++ b/usr/lib/autowifi/plugins/30default_wps @@ -3,4 +3,15 @@ # http://www.wotan.cc/?p=75 cd $(dirname $(readlink -f $0)) . ../lib/wps -try_wps_pin "$@" 12345670 +. ../lib/plugin_core + +parse_plugin_args "$@" +DEFAULT_PIN="${DEFAULT_PIN:-12345670}" + +if has_wps "$ENC"; then + echo "trying PIN $DEFAULT_PIN against $ESSID" >&2 + try_wps_pin "$@" $DEFAULT_PIN +else + echo "Network $ESSID not WPS enabled" >&2 + exit 1 +fi -- cgit v1.2.3