home *** CD-ROM | disk | FTP | other *** search
/ tusportal.tus.k12.pa.us / tusportal.tus.k12.pa.us.tar / tusportal.tus.k12.pa.us / Wyse / latest-image.raw / 0.img / usr / sbin / install_acx100_firmware < prev    next >
Text File  |  2009-02-23  |  991b  |  38 lines

  1. #!/bin/sh
  2. #
  3. # install_intersil_firmware
  4. #
  5. # This script tries to download and install the firmware needed to run
  6. # WLAN cards using the ACX100 chip.
  7.  
  8. die()
  9. {
  10.     popd
  11.     test -d $TMPDIR
  12.     rm -rf $TMPDIR
  13.     exit 1
  14. }
  15.  
  16. test -z "$( type -p curl)" && { echo "'curl' is not installed, aborting"; exit 1; }
  17. test -z "$( type -p unzip)" && { echo "'unzip' is not installed, aborting"; exit 1; }
  18. test -d /lib/firmware || mkdir -p /lib/firmware
  19.  
  20. TMPDIR=$(mktemp -d /var/tmp/acx100.XXXXXX) || exit 1
  21.  
  22. pushd `pwd` >/dev/null
  23. cd $TMPDIR
  24. echo "Downloading firmware"
  25. curl -# -o dwl520+_drivers_307.zip ftp://ftp.dlink.com/Wireless/dwl520+/Driver/dwl520+_drivers_307.zip
  26. echo -n "Installing firmware"
  27. unzip dwl520+_drivers_307.zip >/dev/null || die
  28. mv Drivers/Win2000/WLANGEN.bin /lib/firmware/WLANGEN.BIN || die
  29. mv Drivers/Win2000/RADIO0d.BIN /lib/firmware/ || die
  30. mv Drivers/Win2000/RADIO11.BIN /lib/firmware/ || die
  31. echo
  32. echo "Firmware successfully installed."
  33.  
  34. popd >/dev/null
  35. rm -rf $TMPDIR
  36.  
  37. exit 0
  38.