diff options
author | makefu <github@syntax-fehler.de> | 2013-06-10 20:30:41 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-06-10 20:30:41 +0200 |
commit | 20b1c6c2158fb12b6422c170d4a2a0f402864308 (patch) | |
tree | d31541c882bdb63624466877d3edc2db641c55a1 /usr/lib/autowifi/plugins/30default_wps | |
parent | 910446fb3b32314f9a1efbab5d948d76021a8c7c (diff) |
finish refactoring new wpa_supplicant autowifi
Diffstat (limited to 'usr/lib/autowifi/plugins/30default_wps')
-rwxr-xr-x | usr/lib/autowifi/plugins/30default_wps | 13 |
1 files changed, 12 insertions, 1 deletions
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 |