[script] fix starting network manager (#630)
diff --git a/script/_network_manager b/script/_network_manager
index 2d73179..6dff897 100644
--- a/script/_network_manager
+++ b/script/_network_manager
@@ -333,7 +333,7 @@
if with DNS64; then
# bind9 provides DNS service
sudo sed -i 's/^#port=5353/port=0/g' /etc/dnsmasq.conf
- sudo systemctl stop dnsmasq
+ sudo systemctl restart dnsmasq
fi
sudo systemctl daemon-reload
@@ -379,9 +379,9 @@
with NETWORK_MANAGER || return 0
if with DNS64; then
+ sudo systemctl stop dnsmasq
# revert changes to dnsmasq
sudo sed -i 's/^port=0/#port=5353/g' /etc/dnsmasq.conf
- sudo systemctl restart dnsmasq
fi
if ! have systemctl; then
diff --git a/tests/scripts/check-scripts b/tests/scripts/check-scripts
index 6ac1d95..83f0841 100755
--- a/tests/scripts/check-scripts
+++ b/tests/scripts/check-scripts
@@ -44,6 +44,8 @@
RELEASE=1 ./script/bootstrap
./script/bootstrap
NAT64=1 ./script/setup
+ # re-run to ensure the script can run successfully multiple times
+ NAT64=1 ./script/setup
SOCAT_OUTPUT=/tmp/ot-socat
socat -d -d pty,raw,echo=0 pty,raw,echo=0 >/dev/null 2>$SOCAT_OUTPUT &