Occasionally, WiFi phy will not return to host when container stops/script ends. This makes sure it happens.

pull/14/head
hll 2020-10-10 15:23:41 +03:00
parent 921e9d52a6
commit 5aa320b0ce
1 changed files with 2 additions and 0 deletions

2
run.sh
View File

@ -48,6 +48,8 @@ function _cleanup() {
echo "* Rolling back ip address for main if"
sudo service dhcpcd start
sudo dhclient -r
test $WIFI_ENABLED = 'false' || echo "* returning $WIFI_PHY to host"
test $WIFI_ENABLED = 'false' || sudo iw phy "$WIFI_PHY" set netns 1
echo -ne "* finished"
}