Created
December 10, 2017 12:53
-
-
Save andreacioni/0602c527c6fce5ff8c60c75697dd6245 to your computer and use it in GitHub Desktop.
Restart 8169 module on startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import call | |
from time import sleep | |
while call(["/bin/ping","-c","1","8.8.8.8"]) == 0: | |
print "Network is not reachable, try restarting r8169 driver" | |
call(["rmmod","r8169"]) | |
sleep(5) | |
call(["modprobe","r8169"]) | |
sleep(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment