From 188b810dfa389e02934bc61f345793e107bd83f8 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 21 May 2016 15:47:34 +0300 Subject: [PATCH] do not watch the IP address unless IP address was present in the first plac --- board/common/overlay/etc/init.d/S40network | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/common/overlay/etc/init.d/S40network b/board/common/overlay/etc/init.d/S40network index 164083a0dc..911543274b 100755 --- a/board/common/overlay/etc/init.d/S40network +++ b/board/common/overlay/etc/init.d/S40network @@ -92,7 +92,7 @@ start_wlan() { dhclient -cf "$dh_conf" $wlan fi - if [ "$ip_watch" == "yes" ]; then + if [ "$ip_watch" == "yes" ] && ip addr show dev $wlan | grep inet &>/dev/null; then watch_ip $wlan & fi } @@ -149,7 +149,7 @@ start_eth() { watch_eth & fi - if [ "$ip_watch" == "yes" ]; then + if [ "$ip_watch" == "yes" ] && ip addr show dev $eth | grep inet &>/dev/null; then watch_ip $eth & fi }