From 5aa320b0ce0263608b635770fb5233c93d692e09 Mon Sep 17 00:00:00 2001 From: hll Date: Sat, 10 Oct 2020 15:23:41 +0300 Subject: [PATCH] Occasionally, WiFi phy will not return to host when container stops/script ends. This makes sure it happens. --- run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run.sh b/run.sh index 30ec30e..38938d8 100755 --- a/run.sh +++ b/run.sh @@ -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" }