mirror of
https://github.com/morrownr/8821cu-20210916.git
synced 2024-11-05 19:10:28 +00:00
33 lines
598 B
Bash
Executable File
33 lines
598 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
OPTIONS_FILE="8821cu.conf"
|
|
SCRIPT_NAME="edit-options.sh"
|
|
#
|
|
# Purpose: Make it easier to edit the driver options file.
|
|
#
|
|
# To make this file executable:
|
|
#
|
|
# $ chmod +x edit-options.sh
|
|
#
|
|
# To execute this file:
|
|
#
|
|
# $ sudo ./edit-options.sh
|
|
#
|
|
if [[ $EUID -ne 0 ]]
|
|
then
|
|
echo "You must run this script with superuser (root) privileges."
|
|
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
|
exit 1
|
|
fi
|
|
|
|
nano /etc/modprobe.d/${OPTIONS_FILE}
|
|
|
|
read -p "Do you want to apply the new options by rebooting now? [y/N] " -n 1 -r
|
|
echo # move to a new line
|
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
|
then
|
|
reboot
|
|
fi
|
|
|
|
exit 0
|