aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-01-22 15:36:22 -0500
committerBill Nottingham <notting@redhat.com>2010-01-22 15:36:22 -0500
commitd9d2e42410e211e180a5ebbb968a1df32077f457 (patch)
tree59db89a7820e15cb183e432bc1b6b6db14ffdf97 /sysconfig
parent792e7d658c899db7356afd6ebc532458dfb9da4b (diff)
downloadinitscripts-d9d2e42410e211e180a5ebbb968a1df32077f457.tar
initscripts-d9d2e42410e211e180a5ebbb968a1df32077f457.tar.gz
initscripts-d9d2e42410e211e180a5ebbb968a1df32077f457.tar.bz2
initscripts-d9d2e42410e211e180a5ebbb968a1df32077f457.tar.xz
initscripts-d9d2e42410e211e180a5ebbb968a1df32077f457.zip
If HWADDR is set and DEVICE is not, use HWADDR to determine DEVICE. (#545597)
Diffstat (limited to 'sysconfig')
-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
}