You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
423B

  1. #!/bin/bash
  2. if [ "`which iwconfig`" = "" ] ; then
  3. echo "WARNING:Wireless tool not exist!"
  4. echo " Please install it!"
  5. exit
  6. else
  7. if [ `uname -r | cut -d. -f2` -eq 4 ]; then
  8. wpa_supplicant -D ipw -c wpa1.conf -i wlan0
  9. else
  10. if [ `iwconfig -v |awk '{print $4}' | head -n 1` -lt 18 ] ; then
  11. wpa_supplicant -D ipw -c wpa1.conf -i wlan0
  12. else
  13. wpa_supplicant -D wext -c wpa1.conf -i wlan0
  14. fi
  15. fi
  16. fi