aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2012-03-12 12:42:43 -0400
committerBill Nottingham <notting@redhat.com>2012-03-12 12:44:09 -0400
commitd96c8262ca4697a8a0ef9c6bf6b2f10a69756ba3 (patch)
treeaa593add8e28ed25aba7c7de89715a432c96e118
parent15041a47075d33b3794bcaa4b4bfdcccc1f2465b (diff)
downloadinitscripts-d96c8262ca4697a8a0ef9c6bf6b2f10a69756ba3.tar
initscripts-d96c8262ca4697a8a0ef9c6bf6b2f10a69756ba3.tar.gz
initscripts-d96c8262ca4697a8a0ef9c6bf6b2f10a69756ba3.tar.bz2
initscripts-d96c8262ca4697a8a0ef9c6bf6b2f10a69756ba3.tar.xz
initscripts-d96c8262ca4697a8a0ef9c6bf6b2f10a69756ba3.zip
Fix IFS usage mangling device names (#802119)
-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 7ef7ccea..16005cbd 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