fix defect 4535: xcat can not get the right disk name for powerkvm VM

This commit is contained in:
ertaozh 2015-01-26 04:31:29 -05:00
parent 6ba12f6085
commit decd51de2d

View File

@ -52,7 +52,7 @@ d-i partman/early_command string \
head -n1 /tmp/devs-with-boot | egrep -o '\S+[^0-9]' > /tmp/boot_disk; \
rm /tmp/devs-with-boot 2>/dev/null || true; \
else \
DEV=`ls /dev/disk/by-path/* -l | egrep -o '/dev.*sd[^0-9]$' | sort -t : -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -g | head -n1 | egrep -o 'sd.*$'`; \
DEV=`ls /dev/disk/by-path/* -l | egrep -o '/dev.*[s|h|v]d[^0-9]$' | sort -t : -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -g | head -n1 | egrep -o '[s|h|v]d.*$'`; \
if [[ "$DEV" == "" ]]; then DEV="sda"; fi; \
echo "/dev/$DEV" > /tmp/boot_disk; \
fi; \