aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysconfig/network-scripts/network-functions13
1 files changed, 7 insertions, 6 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index e1c0d6fa..ccb4da59 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -105,6 +105,13 @@ source_config ()
DEVICETYPE="sit"
;;
esac
+ if [ -n "$HWADDR" ]; then
+ HWADDR=$(echo $HWADDR | awk '{ print toupper($0) }')
+ fi
+ if [ -n "$MACADDR" ]; then
+ MACADDR=$(echo $MACADDR | awk '{ print toupper($0) }')
+ fi
+ [ -z "$DEVICE" -a -n "$HWADDR" ] && DEVICE=$(get_device_by_hwaddr $HWADDR)
[ -z "$DEVICETYPE" ] && DEVICETYPE=$(echo ${DEVICE} | sed "s/[0-9]*$//")
[ -z "$REALDEVICE" -a -n "$PARENTDEVICE" ] && REALDEVICE=$PARENTDEVICE
[ -z "$REALDEVICE" ] && REALDEVICE=${DEVICE%%:*}
@@ -113,12 +120,6 @@ source_config ()
else
ISALIAS=no
fi
- if [ -n "$HWADDR" ]; then
- HWADDR=$(echo $HWADDR | awk '{ print toupper($0) }')
- fi
- if [ -n "$MACADDR" ]; then
- MACADDR=$(echo $MACADDR | awk '{ print toupper($0) }')
- fi
}