diff options
author | Bill Nottingham <notting@redhat.com> | 2003-09-11 04:07:22 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2003-09-11 04:07:22 +0000 |
commit | 6cb92ede4478eed4b416d05370475c5758f2a991 (patch) | |
tree | bc2efcc145e7a4244bea8dde4d5e92bf5c3ce252 /sysconfig | |
parent | 0e33cecce10d566567b16c692fee21678d2c11c3 (diff) | |
download | initscripts-6cb92ede4478eed4b416d05370475c5758f2a991.tar initscripts-6cb92ede4478eed4b416d05370475c5758f2a991.tar.gz initscripts-6cb92ede4478eed4b416d05370475c5758f2a991.tar.bz2 initscripts-6cb92ede4478eed4b416d05370475c5758f2a991.tar.xz initscripts-6cb92ede4478eed4b416d05370475c5758f2a991.zip |
always call 'ip link set *dev* ${DEVICE}', to avoid confusion with
other ip parameters (#104187)
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup | 16 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index 65ef52e1..ce8f2110 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -100,7 +100,7 @@ else fi if [ "${REALDEVICE}" = "${DEVICE}" ]; then - ip link set ${DEVICE} down + ip link set dev ${DEVICE} down fi [ "$retcode" = "0" ] && retcode=$? diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index d50380b2..d8924cdb 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -169,7 +169,7 @@ if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" -a \ -x /sbin/ifenslave ]; then RFLAG="" ; [ "${RECEIVEONLY}" = yes ] && RFLAG="-r" - /sbin/ip link set ${DEVICE} down + /sbin/ip link set dev ${DEVICE} down echo $"Enslaving ${DEVICE} to ${MASTER}" ifenslave ${RFLAG} "${MASTER}" "${DEVICE}" @@ -178,7 +178,7 @@ fi # master device? if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE | grep -q "driver: bonding" ; then - /sbin/ip link set ${DEVICE} up + /sbin/ip link set dev ${DEVICE} up for device in `fgrep -l "MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do /sbin/ifup ${device##*/} done @@ -188,10 +188,10 @@ fi # available as a configuration option in the config file, forcing the kernel # to think an ethernet card has a different MAC address than it really has. if [ -n "${MACADDR}" ]; then - ip link set ${DEVICE} address ${MACADDR} + ip link set dev ${DEVICE} address ${MACADDR} fi if [ -n "${MTU}" ]; then - ip link set ${DEVICE} mtu ${MTU} + ip link set dev ${DEVICE} mtu ${MTU} fi # Is there a firewall running, and does it look like one we configured? @@ -241,7 +241,7 @@ if [ -n "${DYNCONFIG}" ]; then echo -n $"Determining IP information for ${DEVICE}..." if check_link_down ${DEVICE}; then echo $" failed; no link present. Check cable?" - ip link set ${DEVICE} down >/dev/null 2>&1 + ip link set dev ${DEVICE} down >/dev/null 2>&1 exit 1 fi @@ -282,7 +282,7 @@ if [ -n "${DYNCONFIG}" ]; then else if [ -z "${IPADDR}" ]; then # enable device without IP, useful for e.g. PPPoE - ip link set ${REALDEVICE} up + ip link set dev ${REALDEVICE} up if [ "${NETWORKING_IPV6}" = "yes" ]; then /etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG} fi @@ -292,9 +292,9 @@ else expand_config [ -n "${ARP}" ] && \ - ip link set ${REALDEVICE} $(toggle_value arp $ARP) + ip link set dev ${REALDEVICE} $(toggle_value arp $ARP) - if ! ip link set ${REALDEVICE} up ; then + if ! ip link set dev ${REALDEVICE} up ; then echo $"Failed to bring up ${DEVICE}." exit 1 fi diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index ad106fb3..0046f935 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -244,8 +244,8 @@ check_ethtool () check_link_down () { if [ -x /sbin/mii-tool -o -x /sbin/ethtool ]; then - if ! LC_ALL=C ip link show $1 2>/dev/null| grep -q UP ; then - ip link set $1 up >/dev/null 2>&1 + if ! LC_ALL=C ip link show dev $1 2>/dev/null| grep -q UP ; then + ip link set dev $1 up >/dev/null 2>&1 timeout=0 while [ $timeout -le 10 ]; do check_mii_tool $1 |