integ/base/initscripts/centos/patches/ifup-eth-stop-waiting-if-link-is-up.patch
chendongqi e8910538de CentOS 8: Upgrade initscripts to version 10.00.1-1.el8_0.1
(1)Release Version Upgrade
(2)Matching code changes with el7 to el8

Story: 2006729
Task: 37669
Depends-On: https://review.opendev.org/#/c/696481/
Depends-On: https://review.opendev.org/#/c/696050/
Change-Id: I085c40a52d94ca38f63f2ff98db74149b750f922
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
2019-12-13 18:15:33 +08:00

54 lines
1.8 KiB
Diff

From 358cb3c0c8feed5ecfaa8ebfc56b7742b88bb14a Mon Sep 17 00:00:00 2001
From: Denny Khoerniawan <denny.khoerniawan@windriver.com>
Date: Wed, 15 Nov 2017 14:02:49 -0500
Subject: [PATCH] ifup-eth stop waiting if link is up
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
---
network-scripts/ifup-eth | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth
index 192ad18..4b8b992 100755
--- a/network-scripts/ifup-eth
+++ b/network-scripts/ifup-eth
@@ -171,7 +171,7 @@ if [ "$ISALIAS" = no ] && is_bonding_device ${DEVICE} ; then
/sbin/ifup ${device##*/} || net_log "Unable to start slave device ${device##*/} for master ${DEVICE}." warning
done
- [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
+ check_link_down ${DEVICE}
# add the bits to setup the needed post enslavement parameters
for arg in $BONDING_OPTS ; do
@@ -191,7 +191,7 @@ if [ -n "${BRIDGE}" ]; then
/sbin/ip addr flush dev ${DEVICE} 2>/dev/null
/sbin/ip link set dev ${DEVICE} up
ethtool_set
- [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
+ check_link_down ${DEVICE}
ip link set ${DEVICE} master ${BRIDGE}
# add the bits to setup driver parameters here
for arg in $BRIDGING_OPTS ; do
@@ -247,7 +247,7 @@ else
# enable device without IP, useful for e.g. PPPoE
ip link set dev ${REALDEVICE} up
ethtool_set
- [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
+ check_link_down ${REALDEVICE}
else
expand_config
@@ -262,7 +262,7 @@ else
ethtool_set
- [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
+ check_link_down ${REAL_DEVICE}
if [ "${DEVICE}" = "lo" ]; then
SCOPE="scope host"
--
2.7.4