From 20c1f1e49fec3bb46c9b433878b1d33b689b8102 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 11 May 2011 17:45:00 +0000 Subject: [PATCH] Repair xHRM script to actually work again git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9567 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/scripts/xHRM | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/share/xcat/scripts/xHRM b/xCAT-server/share/xcat/scripts/xHRM index e415a1aa6..7d538c1d2 100755 --- a/xCAT-server/share/xcat/scripts/xHRM +++ b/xCAT-server/share/xcat/scripts/xHRM @@ -23,6 +23,7 @@ function get_def_interface { IFS=$'\n' INMATCH=0 for brline in $(brctl show); do + IFS=$OIFS if [ $(expr match "$brline" $iface) == $(expr length $iface) ]; then INMATCH=1 elif [ $(expr match "$brline" " ") != 1 ]; then @@ -127,6 +128,7 @@ elif [ "bridgeprereq" = "$1" ]; then #saveip=`ip addr show dev $PORTS scope global|grep inet|sed -e 's/inet.//'|sed -e 's/[^ ]*$//'` if [ ! -z "$saveip" ]; then for line in $saveip; do + IFS=$OIFS ip addr add dev $BNAME $line done else @@ -136,10 +138,15 @@ elif [ "bridgeprereq" = "$1" ]; then fi brctl addif $BNAME $PORTS if [ ! -z "$saveip" ]; then + OIFS=$IFS + IFS=$'\n' for line in $saveip; do + IFS=$OIFS ip addr del dev $PORTS $line done + IFS=$OIFS fi + IFS=$OIFS if [ ! -z "$saveroutes" ]; then ip route add $saveroutes fi