diff options
author | sruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-05-13 18:01:28 +0000 |
---|---|---|
committer | sruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-05-13 18:01:28 +0000 |
commit | 69fabf0902a9936d1cf01cd47dee416d01c6d9f8 (patch) | |
tree | 05afb0f777322be24e51f0866dc3962e5493aabb /build_tools | |
parent | 6968fa17c0026934eb8809545d83988b924d658a (diff) |
Remove old zaptel modules from the kernel modules directory before installing
the new ones.
(Related to issue #12262)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4261 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'build_tools')
-rwxr-xr-x | build_tools/uninstall-modules | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build_tools/uninstall-modules b/build_tools/uninstall-modules index 5d984f0..a654c21 100755 --- a/build_tools/uninstall-modules +++ b/build_tools/uninstall-modules @@ -14,8 +14,8 @@ usage() { echo "Usage:" echo " $0 MODULES_BASE_DIR mod1 [mod2 [...]]" echo "" - echo " MODULES_BASE_DIR - typically /lib/odules/KVERS" - echo " modN - (optinally partial) module name to remove." + echo " MODULES_BASE_DIR - typically /lib/modules/KVERS" + echo " modN - (optionally partial) module name to remove." } if [ -z "$KERNEL_MODULES_DIR" ]; then @@ -30,9 +30,10 @@ if [ -z "$MODULES" ]; then exit 1; fi for mod in $MODULES; do - for file in `cat $KERNEL_MODULES_DIR/modules.dep | cut -d : -f 1 | grep $mod`; do + BASE=`basename $mod` + for file in `cat $KERNEL_MODULES_DIR/modules.dep | cut -d : -f 1 | grep "$BASE$"`; do if [ -e "$file" ]; then - echo "Deleting $file." + #echo "Deleting $file." rm -f $file fi done |