#!/bin/sh
if [ `whoami` != "root" ]; then
	echo "You must be root to run this script."
	exit 1
fi

unset UNLOADED
for i in ipw2200 ieee80211{,_crypt{_{tkip,ccmp,wep},}}; do
	if lsmod | grep -q $i; then
		UNLOADED="${UNLOADED}${i} "
		rmmod $i
	fi
done
if [ -z "${UNLOADED}" ]; then
	echo "No modules unloaded."
else
	echo "Unloaded: $UNLOADED"
fi
