diff options
author | Bill Nottingham <notting@redhat.com> | 2010-01-22 15:36:22 -0500 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2010-01-22 15:36:22 -0500 |
commit | d9d2e42410e211e180a5ebbb968a1df32077f457 (patch) | |
tree | 59db89a7820e15cb183e432bc1b6b6db14ffdf97 /sysconfig/network-scripts | |
parent | 792e7d658c899db7356afd6ebc532458dfb9da4b (diff) | |
download | initscripts-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/network-scripts')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 13 |
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 } |