Fixed the issue that setbootfromdisk cannot handle the multipath without raid.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10253 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz
2011-08-10 05:29:27 +00:00
parent e1fc3ca4cd
commit b12793213e
+33 -1
View File
@@ -48,8 +48,40 @@ if [[ $OS = "Linux" ]]; then
exit 0
fi
if echo $MPATH | grep "sda"
if echo $BOOTDEVICE | grep "mpath"
then
found=0
for i in $MPATH
do
if echo $BOOTDEVICE | grep "$i"
then
found=1
else
if echo $i | grep "mpath"
then
found=0
fi
fi
if [[ $found = 1 ]]
then
if echo $i | grep "sda"
then
logger -t xcat setbootfromdisk: Setting sda sdb to be the default bootup device
echo "setbootfromdisk: setting up sda sdb to be the default bootup device"
bootlist -m normal sda sdb
exit 0
elif echo $i | grep "sdc"
then
logger -t xcat setbootfromdisk: Setting sdc sdd to be the default bootup device
echo "setbootfromdisk: setting up sdc sdd to be the default bootup device"
bootlist -m normal sdc sdd
exit 0
fi
fi
done
if echo $MPATH | grep "sdb"
then
logger -t xcat setbootfromdisk: Setting sda sdb to be the default bootup device