aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-03-17 02:42:07 +0000
committerBill Nottingham <notting@redhat.com>2004-03-17 02:42:07 +0000
commit20a7ac6f32f08103646ffe4b555231e1dea3f741 (patch)
tree8aa489103e52d3737f65348fdb130ecc02a77e5a
parent29cc108b3be859335293941a082e04f5da78df53 (diff)
downloadinitscripts-20a7ac6f32f08103646ffe4b555231e1dea3f741.tar
initscripts-20a7ac6f32f08103646ffe4b555231e1dea3f741.tar.gz
initscripts-20a7ac6f32f08103646ffe4b555231e1dea3f741.tar.bz2
initscripts-20a7ac6f32f08103646ffe4b555231e1dea3f741.tar.xz
initscripts-20a7ac6f32f08103646ffe4b555231e1dea3f741.zip
document MACADDR. fix one of the bizarre interactions with HWADDR.
note that you shouldn't try this at home. (#110427)
-rw-r--r--sysconfig.txt4
-rwxr-xr-xsysconfig/network-scripts/ifdown2
2 files changed, 5 insertions, 1 deletions
diff --git a/sysconfig.txt b/sysconfig.txt
index ed31d3b4..b258a2d9 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -539,6 +539,10 @@ Files in /etc/sysconfig/network-scripts/
use the specified source address for outgoing packets
HWADDR=
ethernet hardware address for this device
+ MACADDR=
+ Set the hardware address for this device to this.
+ Use of this in conjunction with HWADDR= may cause
+ unintended behavior.
If BOOTPROTO is not "none", then the only other item that
must be set is the DEVICE item; all the rest will be determined
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index d5d23c20..a6136d23 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -58,7 +58,7 @@ fi
# Check to make sure the device is actually up
check_device_down ${DEVICE} && [ "$BOOTPROTO" != "dhcp" -a "$BOOTPROTO" != "bootp" ] && [ -n "$VLAN" -a "$VLAN" != "yes" ] && exit 0
-if [ -n "${HWADDR}" ]; then
+if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then
FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
NEWCONFIG=`fgrep -il "HWADDR=${HWADDR}" /etc/sysconfig/network-scripts/ifcfg-*`