summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 3809e6c119..0941f87fa8 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -64,6 +64,12 @@ dhcp_check() {
[ -s "$stamp" ] && return $(cat "$stamp")
+ # If there's no carrier yet, skip this interface.
+ # The init script will be called again once the link is up
+ case "$(devstatus "$ifname" | jsonfilter -e @.carrier)" in
+ false) return 1;;
+ esac
+
udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
[ $rv -eq 1 ] && \