[git commit] service examples: do not respawn supplicant too often
Denys Vlasenko
vda.linux at googlemail.com
Sat Feb 2 18:06:19 UTC 2019
commit: https://git.busybox.net/busybox/commit/?id=e17e8d4b7da27f28956253104218d53328f31995
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
examples/var_service/supplicant_if/run | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/var_service/supplicant_if/run b/examples/var_service/supplicant_if/run
index 45211e001..279d18af5 100755
--- a/examples/var_service/supplicant_if/run
+++ b/examples/var_service/supplicant_if/run
@@ -8,7 +8,8 @@ pwd="$PWD"
if="${PWD##*/dhcp_}"
echo "* Upping iface $if"
-ip link set dev "$if" up
+# "or sleep" idiom prevents rapid respawning if iface does not exist
+ip link set dev "$if" up || { sleep 5; exit; }
##echo "* Powersave disable on $if"
##iw dev "$if" set power_save off
More information about the busybox-cvs
mailing list