aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2001-11-19 10:04:22 +0000
committerHarald Hoyer <harald@redhat.com>2001-11-19 10:04:22 +0000
commitdfb8ca5fb5407de11942bc49bf0c2139b53b84a0 (patch)
tree361424faba195ba379075ef7944b1fea232567cd /sysconfig/network-scripts/ifup
parent221bf36b3c7664fb819c3bbcd197c581a992062b (diff)
downloadinitscripts-dfb8ca5fb5407de11942bc49bf0c2139b53b84a0.tar
initscripts-dfb8ca5fb5407de11942bc49bf0c2139b53b84a0.tar.gz
initscripts-dfb8ca5fb5407de11942bc49bf0c2139b53b84a0.tar.bz2
initscripts-dfb8ca5fb5407de11942bc49bf0c2139b53b84a0.tar.xz
initscripts-dfb8ca5fb5407de11942bc49bf0c2139b53b84a0.zip
set the ethernet number with nameif
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-xsysconfig/network-scripts/ifup17
1 files changed, 2 insertions, 15 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 8b782ed4..94b7caad 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -92,21 +92,8 @@ is_available ${REALDEVICE} || {
fi
}
if [ -n "${HWADDR}" ]; then
- FOUNDMACADDR=`LC_ALL= LANG= ip -o link show ${REALDEVICE} | \
- sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'`
- if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
- NEWCONFIG=`fgrep -l "HWADDR=${HWADDR}" /etc/sysconfig/network-scripts/ifcfg-*`
- if [ -n "${NEWCONFIG}" ]; then
- exec /sbin/ifup ${NEWCONFIG}
- fi
- NEWCONFIG=`fgrep -l "HWADDR=${HWADDR}" /etc/sysconfig/networking/default/ifcfg-*`
- if [ -n "${NEWCONFIG}" ]; then
- exec /sbin/ifup ${NEWCONFIG}
- else
- echo $"Device ${DEVICE} has different MAC address than expected, ignoring."
- exit 1
- fi
- fi
+ # set the appropriate eth number
+ /sbin/nameif ${REALDEVICE} ${HWADDR}
fi
# is the device wireless? If so, configure wireless device specifics