Skip to content

Commit

Permalink
Added error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
roopansh committed Oct 22, 2016
1 parent 2ed9b7c commit 76b75b8
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions rtl8723be.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
#!/bin/bash
sudo modprobe -r rtl8723be
if [ $EUID -ne 0 ]; then
echo "Please run as root"
exit
fi
echo "Removing rtl8723be module form the kernel"
echo "Entering /etc/modprobe.d/"
echo "Changing the rtl8723be settings"
echo "options rtl8723be fwlps=N ips=N ant_sel=1" | sudo tee /etc/modprobe.d/rtl8723be.conf
echo "Adding rtl8723be module back to the kernel"
sudo modprobe rtl8723be
modprobe -r rtl8723be
if [ "$?" = "0" ]; then
echo "Entering /etc/modprobe.d/"
echo "Changing the rtl8723be settings"
echo "options rtl8723be fwlps=N ips=N ant_sel=1" | sudo tee /etc/modprobe.d/rtl8723be.conf
if [ "$?" = "0" ]; then
echo "Adding rtl8723be module back to the kernel"
echo "Return status 0"
else
echo "There were errors editing the module options"
echo "Process returned with some errors"
modprobe rtl8723be
return 1
fi
else
echo "There were errors removing the Module from the kernel"
echo "Process returned with some errors"
return 1
fi
modprobe rtl8723be

0 comments on commit 76b75b8

Please sign in to comment.