Fixed the issue that setbootfromdisk cannot handle the multipath without raid.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10252 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user