Last active
January 14, 2017 00:21
-
-
Save psyke83/a2476609557f58ad946d to your computer and use it in GitHub Desktop.
openwrt wl-842n ag71xx workaround
This file contains hidden or 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
#!/bin/sh | |
trigger="eth1: tx timeout" | |
if [ "$1" = "force" ]; then | |
lastbuffer="" | |
else | |
lastbuffer=$(dmesg | grep "$trigger" | tail -n1) | |
fi | |
while true; do | |
buffer=$(dmesg | grep "$trigger" | tail -n1) | |
if [ "$buffer" != "$lastbuffer" ]; then | |
lastbuffer=$buffer | |
/etc/init.d/network restart | |
fi | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment