From bc040d106dba2c362f6ba962c11df11e22ade4b2 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Tue, 29 Oct 2019 15:59:26 +0200 Subject: [PATCH] prepwifi: avoid race conditions in the stupidest way imaginable --- prepwifi.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prepwifi.sh b/prepwifi.sh index 6bb90da..8bb9742 100644 --- a/prepwifi.sh +++ b/prepwifi.sh @@ -22,7 +22,9 @@ ssh -o stricthostkeychecking=no root@${ip} uptime scp -r * root@${ip}:/ ssh root@${ip} "/etc/init.d/wifi-sentinel enable; /etc/init.d/odhcpd disable; /etc/init.d/dnsmasq disable; reboot" +sleep 3 while ! fping ${newip}; do sleep 5; done - ssh-keygen -R ${newip} +sleep 3 + ssh -o stricthostkeychecking=no root@${newip} "opkg remove wpad-mini; opkg update && opkg install ebtables tcpdump bc iftop hostapd-openssl && reboot"