1
0
mirror of https://github.com/morrownr/8821cu-20210916.git synced 2024-11-18 19:44:48 +00:00
8821cu-20210916/edit-options.sh
2022-11-17 08:26:57 -06:00

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