aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-06-24 04:13:19 +0000
committerBill Nottingham <notting@redhat.com>2003-06-24 04:13:19 +0000
commit9f38f0eeba5d63c36e910cde44b9bc59c2b5aba3 (patch)
treebb066f6179947d8bb583ca4e367faf723f3dc301 /sysconfig/network-scripts/ifup
parent642f9be2bce629712adc76374f472f7e9f691361 (diff)
downloadinitscripts-9f38f0eeba5d63c36e910cde44b9bc59c2b5aba3.tar
initscripts-9f38f0eeba5d63c36e910cde44b9bc59c2b5aba3.tar.gz
initscripts-9f38f0eeba5d63c36e910cde44b9bc59c2b5aba3.tar.bz2
initscripts-9f38f0eeba5d63c36e910cde44b9bc59c2b5aba3.tar.xz
initscripts-9f38f0eeba5d63c36e910cde44b9bc59c2b5aba3.zip
more tweaks
- encapsulate grabing the hw addr into its own function - normalize case of all hwaddrs - if we are passed a device with no config, see if there's a config for that hwaddr
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-xsysconfig/network-scripts/ifup3
1 files changed, 1 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index ba649c12..13232704 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -141,8 +141,7 @@ is_available ${REALDEVICE}
# remap, if the device is bound with a MAC address and not the right device num
# bail out, if the MAC does not fit
if [ -n "${HWADDR}" ]; then
- FOUNDMACADDR=`LC_ALL= LANG= ip -o link show ${REALDEVICE} 2>/dev/null| \
- sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'`
+ FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
/sbin/nameif "${REALDEVICE}" "${HWADDR}" || {
echo $"Device ${DEVICE} has different MAC address than expected, ignoring."