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
This commit is contained in:
jbjohnso 2011-05-11 17:45:00 +00:00
parent d35ced25c8
commit 20c1f1e49f

View File

@ -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