aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--network-scripts/network-functions7
1 files changed, 5 insertions, 2 deletions
diff --git a/network-scripts/network-functions b/network-scripts/network-functions
index c80467ab..b2ef99e1 100644
--- a/network-scripts/network-functions
+++ b/network-scripts/network-functions
@@ -459,14 +459,17 @@ check_device_down ()
set_link_up ()
{
- if [ "$LINKSTATUS" != up ]; then
+ if [ "$LINKSTATUS" != down ]; then
ip link set dev $1 up >/dev/null 2>&1
fi
}
check_link_down ()
{
- set_link_up $1
+ if ! LC_ALL=C ip link show dev $1 2>/dev/null| grep -q ",UP" ; then
+ set_link_up $1
+ fi
+
timeout=0
delay=10
[ -n "$LINKDELAY" ] && delay=$(($LINKDELAY * 2))