aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
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:42:43 -0400
commit6ddce805ccecb7f02a31a413c501217336e3791a (patch)
tree15aa120e3ea18446d55c73fdcc7d8f6ea24ad213 /sysconfig/network-scripts
parenta54ce5d02861745ffcf5dbc6409950a22c7c65a2 (diff)
downloadinitscripts-6ddce805ccecb7f02a31a413c501217336e3791a.tar
initscripts-6ddce805ccecb7f02a31a413c501217336e3791a.tar.gz
initscripts-6ddce805ccecb7f02a31a413c501217336e3791a.tar.bz2
initscripts-6ddce805ccecb7f02a31a413c501217336e3791a.tar.xz
initscripts-6ddce805ccecb7f02a31a413c501217336e3791a.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 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