Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save grahamperrin/121bc018a1675e7532e0cf88de0c22f9 to your computer and use it in GitHub Desktop.
Save grahamperrin/121bc018a1675e7532e0cf88de0c22f9 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo " "
echo " net.redirectme.perrin.trueos.openrc.wlan0.workarounds.sh "
echo " "
echo " – a series of OpenRC commands that may help in situations where a "
echo " known good wireless Internet connection does not begin when expected …"
echo " "
echo " a request to stop the DHCP client daemon for wireless networking, "
rc-service dhcpcd.wlan0 stop
echo " a wait of two seconds …"
sleep 2
echo " "
echo " a request to stop the supplicant for WEP, WPA and WPA2, "
rc-service wpa_supplicant.wlan0 stop
echo " a wait of two seconds …"
sleep 2
echo " "
echo " a request to stop the 'wlan0' wireless network interface, "
rc-service network.wlan0 stop
echo " a wait of two seconds …"
sleep 2
echo " "
echo " a request to start the interface, "
rc-service network.wlan0 start
echo " a wait of thirty seconds, which should be long enough for "
echo " start of the supplicant, association with the preferred network and "
echo " start of the DHCP client daemon …"
sleep 30
echo " "
echo " the default route, "
echo " "
time route show default
echo " "
echo " a wait of five seconds …"
sleep 5
echo " "
echo " DNS information, "
echo " "
drill
echo " "
echo " ----"
echo " "
echo " If that did not have the desired effect, and "
echo " if your computer has a switch for wireless, then you can try: "
echo " "
echo " a) switch off "
echo " b) wait a second or two "
echo " c) switch on "
echo " d) again, wait a second or two "
echo " e) another run of this script. "
echo " "
echo " ----"
echo " "
@grahamperrin
Copy link
Author

Re trueos/trueos-core#205 (comment) – in particular, the recent port of /etc/rc.d/netif from FreeBSD – I am prepared for eventual retirement of this script. All other users of the script should please be prepared to do the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment