aboutsummaryrefslogtreecommitdiff
path: root/examples/var_service
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-02-02 19:06:19 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2019-02-02 19:06:19 +0100
commite17e8d4b7da27f28956253104218d53328f31995 (patch)
tree76aaf083583fdfafebd2bc9947714fd2c251f699 /examples/var_service
parentd4b568c108b89fb726181b0fabb19f2d62bc1930 (diff)
downloadbusybox-e17e8d4b7da27f28956253104218d53328f31995.tar.gz
service examples: do not respawn supplicant too often
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'examples/var_service')
-rwxr-xr-xexamples/var_service/supplicant_if/run3
1 files changed, 2 insertions, 1 deletions
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