Skip to content

Commit

Permalink
Allow to slave devices execute ifup-post.
Browse files Browse the repository at this point in the history
  • Loading branch information
k0ste committed Jul 20, 2017
1 parent a536188 commit b8d1b0c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sysconfig/network-scripts/ifup-eth
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" ]; then
echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null
}
ethtool_set
exec /etc/sysconfig/network-scripts/ifup-post ${CONFIG} ${2}

exit 0
fi
Expand All @@ -146,10 +147,10 @@ if [ "$ISALIAS" = no ] && is_bonding_device ${DEVICE} ; then
[ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}

# add the bits to setup the needed post enslavement parameters
for arg in $BONDING_OPTS ; do
for arg in $BONDING_OPTS ; do
key=${arg%%=*};
value=${arg##*=};
if [ "${key}" = "primary" ]; then
if [ "${key}" = "primary" ]; then
echo $value > /sys/class/net/${DEVICE}/bonding/$key
fi
done
Expand Down Expand Up @@ -213,7 +214,7 @@ if [ -n "${DYNCONFIG}" ] && [ -x /sbin/dhclient ]; then
net_log "Unable to obtain IPv4 DHCP address ${DEVICE}." warning
fi
# end dynamic device configuration
else
else
if [ -z "${IPADDR}" -a -z "${IPADDR0}" -a -z "${IPADDR1}" -a -z "${IPADDR2}" ]; then
# enable device without IP, useful for e.g. PPPoE
ip link set dev ${REALDEVICE} up
Expand Down

0 comments on commit b8d1b0c

Please sign in to comment.