aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2012-03-12 12:42:43 -0400
committerLukas Nykryn <lnykryn@redhat.com>2012-03-20 08:59:42 +0100
commit2a1bfc8f1d993eeee67d6faf0f4df6f63b75980c (patch)
treed686621b759d0d436f45f1b846ce4b3af733f947 /sysconfig/network-scripts
parenta8bd1691a230db82d35cc140787436f0c8560258 (diff)
downloadinitscripts-2a1bfc8f1d993eeee67d6faf0f4df6f63b75980c.tar
initscripts-2a1bfc8f1d993eeee67d6faf0f4df6f63b75980c.tar.gz
initscripts-2a1bfc8f1d993eeee67d6faf0f4df6f63b75980c.tar.bz2
initscripts-2a1bfc8f1d993eeee67d6faf0f4df6f63b75980c.tar.xz
initscripts-2a1bfc8f1d993eeee67d6faf0f4df6f63b75980c.zip
Fix IFS usage mangling device names (#802119)
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifup-aliases10
1 files changed, 1 insertions, 9 deletions
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index c19d8d1e..15673e47 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -86,10 +86,7 @@ cd /etc/sysconfig/network-scripts
#
# A list of all the devices is created in rdev_LIST.
-OLDIFS=$IFS
-IFS='\n'
-
-for RDEV_VAR in $( ip addr show $device label $device:* | \
+eval $( ip addr show $device label $device:* | \
awk 'BEGIN { COUNT=0;LAST_DEV="" } /inet / {
# Split IP address into address/prefix
split($2,IPADDR,"/");
@@ -105,11 +102,6 @@ for RDEV_VAR in $( ip addr show $device label $device:* | \
} END {
if(LAST_DEV == "") print "no_devices_are_up=yes"
}' );
-do
- eval $RDEV_VAR
-done
-
-IFS=$OLDIFS
#
# Store configuration of the parent device and network