diff options
author | Colin Guthrie <colin@mageia.org> | 2016-06-07 17:28:01 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2016-06-07 17:28:01 +0100 |
commit | b53d95939e513b135b688548e8b587129ac683dd (patch) | |
tree | 7b5aea6656107fafe96382217323d18df5090454 /sysconfig | |
parent | 08eee6c0c91bcff0c401a12fd7b640a1831408ba (diff) | |
parent | 3a01f26785ca58a4c50648dbaccaf5ddbd61e028 (diff) | |
download | initscripts-b53d95939e513b135b688548e8b587129ac683dd.tar initscripts-b53d95939e513b135b688548e8b587129ac683dd.tar.gz initscripts-b53d95939e513b135b688548e8b587129ac683dd.tar.bz2 initscripts-b53d95939e513b135b688548e8b587129ac683dd.tar.xz initscripts-b53d95939e513b135b688548e8b587129ac683dd.zip |
Merge tag 'initscripts-9.66-1' into distro/mga
Tag as initscripts-9.66-1
Conflicts:
service
sysconfig/network-scripts/ifup-wireless
Notes:
The 'service' wrapper was kept as the Mageia version.
We should look into moving this over to the upstream version
although some people will likely complain at syntax changes.
ifup-wireless was also kept as Mageia version. The changes
introduced downstream in the past are complex and we cannot
easily merge in the upstream changes. We should try to move
away from this. Most users should use network manager but for
those using these legacy scripts we should at least try and use
e.g. iw rather than the legacy iwconfig utilities.
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 16 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 6 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 4 |
3 files changed, 14 insertions, 12 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 81e352df..2c011efa 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -60,7 +60,7 @@ fi fi if is_bonding_device ${DEVICE} ; then - for device in $(LANG=C grep -l "^[[:space:]]*MASTER=\"\?${DEVICE}\"\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do + for device in $(LANG=C grep -l "^[[:space:]]*MASTER=['\"]\?${DEVICE}['\"]\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do is_ignored_file "$device" && continue /sbin/ifdown ${device##*/} done @@ -142,15 +142,15 @@ fi # brought up. Flush all addresses associated with this # instance instead. if [ -d "/sys/class/net/${REALDEVICE}" ]; then + LABEL= + if [ "${REALDEVICE}" != "${DEVICE}" ]; then + LABEL="label ${DEVICE}" + fi if [ "${REALDEVICE}" = "lo" ]; then - SCOPE="host" + ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null else - SCOPE="global" - fi - if [ "${REALDEVICE}" = "${DEVICE}" ]; then - ip addr flush dev ${REALDEVICE} scope ${SCOPE} 2>/dev/null - else - ip addr flush dev ${REALDEVICE} label ${DEVICE} scope ${SCOPE} 2>/dev/null + ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null + ip -4 addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null fi if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index cc1afd78..1ecedcf4 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -76,7 +76,9 @@ if [ "${TYPE}" = "Bridge" ]; then for arg in $BRIDGING_OPTS ; do key=${arg%%=*}; value=${arg##*=}; - echo $value > /sys/class/net/${DEVICE}/bridge/$key + if [ "${key}" != "multicast_router" -a "${key}" != "hash_max" -a "${key}" != "multicast_snooping" ]; then + echo $value > /sys/class/net/${DEVICE}/bridge/$key + fi done # set LINKDELAY (used as timeout when calling check_link_down()) # to at least (${DELAY} * 2) + 7 if STP is enabled. This is the @@ -205,7 +207,7 @@ fi if [ "$ISALIAS" = no ] && is_bonding_device ${DEVICE} ; then install_bonding_driver ${DEVICE} /sbin/ip link set dev ${DEVICE} up - for device in $(LANG=C grep -l "^[[:space:]]*MASTER=\"\?${DEVICE}\"\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do + for device in $(LANG=C grep -l "^[[:space:]]*MASTER=['\"]\?${DEVICE}['\"]\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do is_ignored_file "$device" && continue /sbin/ifup ${device##*/} || net_log "Unable to start slave device ${device##*/} for master ${DEVICE}." warning done diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 93593aba..3c0205f0 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -24,14 +24,14 @@ get_hwaddr () get_config_by_device () { - LANG=C grep -l "^[[:space:]]*DEVICE=\"\?${1}\"\?\([[:space:]#]\|$\)" \ + LANG=C grep -l "^[[:space:]]*DEVICE=['\"]\?${1}['\"]\?\([[:space:]#]\|$\)" \ /etc/sysconfig/network-scripts/ifcfg-* \ | LC_ALL=C sed -e "$__sed_discard_ignored_files" } get_config_by_hwaddr () { - LANG=C grep -il "^[[:space:]]*HWADDR=\"\?${1}\"\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-* \ + LANG=C grep -il "^[[:space:]]*HWADDR=['\"]\?${1}['\"]\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-* \ | LC_ALL=C sed -e "$__sed_discard_ignored_files" } |