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:
parent
d35ced25c8
commit
20c1f1e49f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user