Fix the install issue for /dev/mdX device. (#2846)

This commit is contained in:
longpanda 2024-05-23 19:30:11 +08:00
parent 4d55f505f9
commit d6e1730ca0

View file

@ -94,6 +94,8 @@ get_disk_part_name() {
echo ${DISK}p${2} echo ${DISK}p${2}
elif echo $DISK | grep -q "/dev/zd[0-9]"; then elif echo $DISK | grep -q "/dev/zd[0-9]"; then
echo ${DISK}p${2} echo ${DISK}p${2}
elif echo $DISK | grep -q "/dev/md[0-9]"; then
echo ${DISK}p${2}
else else
echo ${DISK}${2} echo ${DISK}${2}
fi fi
@ -211,14 +213,14 @@ get_disk_ventoy_version() {
wait_and_create_part() { wait_and_create_part() {
vPART1=$1 vPART1=$1
vPART2=$2 vPART2=$2
echo 'Wait for partitions ...' echo 'Wait for partitions $vPART1 and $vPART2 ...'
for i in 0 1 2 3 4 5 6 7 8 9; do for i in 0 1 2 3 4 5 6 7 8 9; do
if ls -l $vPART1 2>/dev/null | grep -q '^b'; then if ls -l $vPART1 2>/dev/null | grep -q '^b'; then
if ls -l $vPART2 2>/dev/null | grep -q '^b'; then if ls -l $vPART2 2>/dev/null | grep -q '^b'; then
break break
fi fi
else else
echo "Wait for $vPART1/$vPART2 ..." echo "Wait for $vPART1 and $vPART2 ..."
sleep 1 sleep 1
fi fi
done done