diff options
author | Bill Nottingham <notting@redhat.com> | 2001-08-02 18:12:54 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2001-08-02 18:12:54 +0000 |
commit | 4243ae04d6a405affb743bec9a1e72637ef60e67 (patch) | |
tree | 55f107228c184c7d2a48238a8825f1728a6190a5 /sysconfig/network-scripts/ifup | |
parent | 43a1ade3deb73903ab610af0d091189bcbe3372e (diff) | |
download | initscripts-4243ae04d6a405affb743bec9a1e72637ef60e67.tar initscripts-4243ae04d6a405affb743bec9a1e72637ef60e67.tar.gz initscripts-4243ae04d6a405affb743bec9a1e72637ef60e67.tar.bz2 initscripts-4243ae04d6a405affb743bec9a1e72637ef60e67.tar.xz initscripts-4243ae04d6a405affb743bec9a1e72637ef60e67.zip |
don't worry about profiles just now. look for alternate config files that contain the correct MAC address for the adapter
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 303fe33e..5249a33c 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -93,8 +93,17 @@ if [ -n "${HWADDR}" ]; then FOUNDMACADDR=`LC_ALL= LANG= ip -o link show ${REALDEVICE} | \ sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'` if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then - echo $"Device ${DEVICE} has different MAC address than expected, ignoring." - exit 1 + 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 fi |