uninstall.sh 297 B

123456789101112131415161718
  1. #!/bin/bash
  2. DIR=`readlink -f "${BASH_SOURCE[0]}"`
  3. MOD=graphene-ipc
  4. MODNAME=graphene_ipc
  5. VER=0.0.1
  6. /sbin/lsmod | grep -q $MODNAME
  7. if [ $? -eq 0 ]; then
  8. modprobe -r $MODNAME
  9. fi
  10. /usr/sbin/dkms status | grep -q $MOD
  11. if [ $? -eq 0 ]; then
  12. dkms remove $MOD/$VER --all
  13. fi
  14. rm -rf /usr/src/$MOD-$VER