install.sh 556 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. if [ "$(id -u)" != "0" ]; then
  3. echo "This script must be run as root" 1>&2
  4. exit 1
  5. fi
  6. make &&
  7. cp 8812au.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless &&
  8. depmod &&
  9. echo "
  10. ***Success***
  11. ***Module will be activated automatically at next reboot***
  12. " &&
  13. while true; do
  14. read -p "Do you wish to activate the module now? (y/n)" yn
  15. case $yn in
  16. [Yy]* ) insmod 8812au.ko && echo "***Module activated***" && break;;
  17. [Nn]* ) exit;;
  18. * ) echo "Please answer yes or no.";;
  19. esac
  20. done