aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Macku <jamacku@redhat.com>2021-02-04 14:33:23 +0100
committerGitHub <noreply@github.com>2021-02-04 14:33:23 +0100
commitb1626389507a3d9e4d7e7805939c3a589954bb46 (patch)
tree53070f22ac0fd8c7787c29f6c81b4bd077cfd0a9
parent24d1890a9b9d29515403aedec34ddc95613bf68f (diff)
downloadinitscripts-b1626389507a3d9e4d7e7805939c3a589954bb46.tar
initscripts-b1626389507a3d9e4d7e7805939c3a589954bb46.tar.gz
initscripts-b1626389507a3d9e4d7e7805939c3a589954bb46.tar.bz2
initscripts-b1626389507a3d9e4d7e7805939c3a589954bb46.tar.xz
initscripts-b1626389507a3d9e4d7e7805939c3a589954bb46.zip
network: fix condition in set_link_up()
-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))