aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/dad.if-up
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2018-12-06 16:57:29 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2018-12-06 16:58:44 +0200
commit211a6eb9128981e6ba6c9121781ff2fab6d87d1c (patch)
treef83bede538f38e5cd8289dc2ec44140237ec4d2f /main/busybox/dad.if-up
parent13ecc03954dea8dbc1cb1605cb84d1672eef88af (diff)
downloadaports-211a6eb9128981e6ba6c9121781ff2fab6d87d1c.tar.gz
aports-211a6eb9128981e6ba6c9121781ff2fab6d87d1c.tar.bz2
aports-211a6eb9128981e6ba6c9121781ff2fab6d87d1c.tar.xz
main/busybox: do not hang on DAD failure
Diffstat (limited to 'main/busybox/dad.if-up')
-rw-r--r--main/busybox/dad.if-up8
1 files changed, 6 insertions, 2 deletions
diff --git a/main/busybox/dad.if-up b/main/busybox/dad.if-up
index e76bb60bfa..98841da7c0 100644
--- a/main/busybox/dad.if-up
+++ b/main/busybox/dad.if-up
@@ -1,8 +1,12 @@
#!/bin/sh
# Block ifup until DAD completion
-# Copyright (c) 2016 Kaarle Ritvanen
+# Copyright (c) 2016-2018 Kaarle Ritvanen
-while ip address show dev $IFACE | grep -q " tentative "; do
+has_flag() {
+ ip address show dev $IFACE | grep -q " $1 "
+}
+
+while has_flag tentative && ! has_flag dadfailed; do
sleep 0.2
done