File: unload

package info (click to toggle)
ipw2100 1.1.0-1
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 672 kB
  • ctags: 1,922
  • sloc: ansic: 10,914; sh: 292; makefile: 246
file content (21 lines) | stat: -rwxr-xr-x 461 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Copyright (C) 2004-2005 Intel Corporation
#
MODULE=ipw2100
if [ `whoami` != "root" ]; then
	echo "You must be root to run this script."
	return
fi

unset UNLOADED
for i in ${MODULE} ieee80211 ieee80211_crypt_wep ieee80211_crypt_tkip ieee80211_crypt_ccmp ieee80211_crypt ; 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