ACC SHELL
Path : /usr/sbin/ |
|
Current File : //usr/sbin/install_acx100_firmware |
#!/bin/sh
#
# install_intersil_firmware
#
# This script tries to download and install the firmware needed to run
# WLAN cards using the ACX100 chip.
URL="ftp://ftp.dlink.com/Wireless/dwl520+/Driver"
FWFILE="dwl520+_drivers_307.zip"
die()
{
popd
test -d $TMPDIR
rm -rf $TMPDIR
exit 1
}
curldie()
{
popd
test -d $TMPDIR
rm -rf $TMPDIR
echo ""
echo ""
echo "Could not find firmware ${FWFILE} at:"
echo ""
echo "${URL}"
echo ""
echo "You might want to search for it at a different location in the internet"
echo "Press <ENTER> to proceed - I quit now"
read ANT
exit 1
}
WHO=`id -u`
test "${WHO}" = "0" || { echo "You have to be root to do this!"; exit 1; }
test -z "$( type -p curl)" && { echo "'curl' is not installed, aborting"; exit 1; }
test -z "$( type -p unzip)" && { echo "'unzip' is not installed, aborting"; exit 1; }
test -d /lib/firmware || mkdir -p /lib/firmware
TMPDIR=$(mktemp -d /var/tmp/acx100.XXXXXX) || exit 1
pushd `pwd` >/dev/null
cd $TMPDIR
echo "Downloading firmware"
curl -# -o ${FWFILE} ${URL}/${FWFILE}
echo -n "Installing firmware"
unzip dwl520+_drivers_307.zip >/dev/null || die
mv Drivers/Win2000/WLANGEN.bin /lib/firmware/WLANGEN.BIN || die
mv Drivers/Win2000/RADIO0d.BIN /lib/firmware/ || die
mv Drivers/Win2000/RADIO11.BIN /lib/firmware/ || die
echo
echo "Firmware successfully installed."
popd >/dev/null
rm -rf $TMPDIR
exit 0
ACC SHELL 2018