3 if [ -z "${1}" ] ; then
5 echo "Locate all madwifi-related kernel modules for a given kernel"
6 echo "(including all its subdirectories)."
9 echo "$0 [-l] [-r] <kernelrelease> [destdir]"
11 echo "<kernelrelease>: the kernel release that madwifi has been compiled for"
12 echo "[destdir]: destination directory for the compiled madwifi modules (optional)"
13 echo "-l list the modules we find."
14 echo "-r remove the modules we find."
15 echo "If neither -l or -r is specified, the user will be prompted."
40 if [ -n "${2}" ]; then
46 SEARCH="${KDEST}/lib/modules/${KVERS}"
48 PATTERN="^.*\/(ath_(hal|pci|rate_[^.]*)\.k?o)|(wlan(_(acl|ccmp|scan_(ap|sta)|tkip|wep|xauth))?\.k?o)$"
49 OLD_MODULES=$(find ${SEARCH} -type f -regex '.*\.k?o' 2>/dev/null | grep -w -E "${PATTERN}")
53 if [ -n "${OLD_MODULES}" ]; then
54 if [ "$LIST_CMD" -eq 1 ] || [ "$REMOVE_CMD" -eq 1 ]; then
55 if [ "$LIST_CMD" -eq 1 ]; then
56 for m in ${OLD_MODULES}; do echo ${m}; done
58 if [ "$REMOVE_CMD" -eq 1 ]; then
64 echo "It seems that there are modules left from previous MadWifi installations."
65 echo "If you are unistalling the MadWifi modules please press \"r\" to remove them."
66 echo "If you are installing new MadWifi modules, you should consider removing those"
67 echo "already installed, or else you may experience problems during operation."
68 echo "Remove old modules?"
72 echo -n "[l]ist, [r]emove, [i]gnore or e[x]it (l,r,i,[x]) ? "
77 for m in ${OLD_MODULES}; do echo ${m}; done