generated from ublue-os/udev-rules
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy path50-akmods.just
30 lines (28 loc) · 1.36 KB
/
50-akmods.just
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# vim: set ft=make :
alias broadcom-wl := configure-broadcom-wl
# Configure Broadcom WL driver (Enabling WL breaks numerous other Wi-Fi adapters)
configure-broadcom-wl ACTION="prompt":
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
OPTION={{ ACTION }}
if [ "$OPTION" == "prompt" ]; then
echo "${bold}Configuring Broadcom Wi-Fi${normal}"
echo 'Enabling Broadcom WL driver will break numerous other Wi-Fi adapters.'
echo 'Enable or Disable Broadcom Wl?'
OPTION=$(ugum choose Enable Disable)
elif [ "$OPTION" == "help" ]; then
echo "Usage: ujust configure-broadcom-wl <option>"
echo " <option>: Specify the quick option - 'enable' or 'disable'"
echo " Use 'enable' to select Enable"
echo " Use 'disable' to select Disable"
exit 0
fi
if [ "${OPTION,,}" == "enable" ]; then
sudo rm -f /etc/modprobe.d/broadcom-wl-blacklist.conf
sudo rm -f /etc/modprobe.d/default-disable-broadcom-wl.conf
echo "${bold}Enabled${normal} Broadcom Wireless, please reboot for changes to take effect"
elif [ "${OPTION,,}" == "disable" ]; then
sudo bash -c '> /etc/modules-load.d/broadcom-wl-blacklist.conf'
sudo bash -c 'echo "blacklist wl" > /etc/modules-load.d/default-disable-broadcom-wl.conf'
echo "${bold}Disabled${normal} Broadcom Wireless, please reboot for changes to take effect"
fi