mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
reboot if reload fails
This commit is contained in:
@ -11,7 +11,10 @@ fi
|
||||
|
||||
# check if wifi driver is bugged
|
||||
if ! check_brcm; then
|
||||
reload_brcm
|
||||
if ! reload_brcm; then
|
||||
echo "Could not reload wifi driver. Reboot"
|
||||
reboot
|
||||
fi
|
||||
sleep 10
|
||||
fi
|
||||
|
||||
|
@ -22,8 +22,13 @@ check_brcm() {
|
||||
|
||||
# reload mod
|
||||
reload_brcm() {
|
||||
rmmod brcmfmac
|
||||
modprobe brcmfmac
|
||||
if ! modprobe -r brcmfmac; then
|
||||
return 1
|
||||
fi
|
||||
if ! modprobe brcmfmac; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# starts mon0
|
||||
|
Reference in New Issue
Block a user