aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsysconfig/network-scripts/ifup13
-rw-r--r--sysconfig/network-scripts/network-functions16
2 files changed, 13 insertions, 16 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
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index f759682e..ee6b3356 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -6,9 +6,9 @@
need_config()
{
[ -f "${CONFIG}" ] || \
- CONFIG=../networking/`current_profile`/${1}
+ CONFIG=../networking/default/${1}
[ -f "${CONFIG}" ] || \
- CONFIG=../networking/`current_profile`/ifcfg-${1}
+ CONFIG=../networking/default/ifcfg-${1}
[ -f "${CONFIG}" ] || \
CONFIG="ifcfg-${1}"
}
@@ -181,15 +181,3 @@ is_wireless_device ()
fi
return 1
}
-
-
-current_profile ()
-{
- if [ "${CURRENT_PROFILE}" != "" ]; then
- echo ${CURRENT_PROFILE}
- elif [ "${DEFAULT_PROFILE}" != "" ]; then
- echo ${DEFAULT_PROFILE}
- else
- echo "default"
- fi
-}