Mageia Bugzilla – Attachment 10881 Details for
Bug 24558
/etc/sysconfig/network-scripts/ifup-post fails to set (and clears) routes if interface slow to come up.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to fix /etc/sysconfig/network-scripts/ifup-post
ifup-post.patch (text/plain), 661 bytes, created by
Stephen Usher
on 2019-03-25 16:07:28 CET
(
hide
)
Description:
Patch to fix /etc/sysconfig/network-scripts/ifup-post
Filename:
MIME Type:
Creator:
Stephen Usher
Created:
2019-03-25 16:07:28 CET
Size:
661 bytes
patch
obsolete
>*** ifup-post.dist Mon Mar 25 14:55:03 2019 >--- ifup-post Mon Mar 25 14:55:37 2019 >*************** >*** 22,27 **** >--- 22,35 ---- > > /etc/sysconfig/network-scripts/ifup-routes ${REALDEVICE} ${DEVNAME} > >+ # Wait until the interface is up as ifmetric fails on new kernels if the interface is down. >+ upstat=`ip link show ${DEVICE} | awk '{ print $9 }'` >+ >+ if [ $upstat == 'DOWN' ]; then >+ sleep 2 >+ upstat=`ip link show ${DEVICE} | awk '{ print $9 }'` >+ fi >+ > # metric setting (skip for alias interfaces) > if [ "${REALDEVICE}" = "${DEVICE}" ] && [ -n "$METRIC" ] && type -p ifmetric > /dev/null 2>&1; then > ifmetric ${DEVICE} $METRIC
*** ifup-post.dist Mon Mar 25 14:55:03 2019 --- ifup-post Mon Mar 25 14:55:37 2019 *************** *** 22,27 **** --- 22,35 ---- /etc/sysconfig/network-scripts/ifup-routes ${REALDEVICE} ${DEVNAME} + # Wait until the interface is up as ifmetric fails on new kernels if the interface is down. + upstat=`ip link show ${DEVICE} | awk '{ print $9 }'` + + if [ $upstat == 'DOWN' ]; then + sleep 2 + upstat=`ip link show ${DEVICE} | awk '{ print $9 }'` + fi + # metric setting (skip for alias interfaces) if [ "${REALDEVICE}" = "${DEVICE}" ] && [ -n "$METRIC" ] && type -p ifmetric > /dev/null 2>&1; then ifmetric ${DEVICE} $METRIC
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24558
: 10881