"Fix" race condition in riju-init-volume
This commit is contained in:
parent
b9e0d4049c
commit
2ba198b645
|
@ -27,6 +27,8 @@ print "volume has ${num_parts} partition(s)"
|
||||||
if [[ "${num_parts}" != 1 ]]; then
|
if [[ "${num_parts}" != 1 ]]; then
|
||||||
print "repartitioning so we have exactly one partition"
|
print "repartitioning so we have exactly one partition"
|
||||||
sfdisk -X gpt "/dev/${disk}" <<< ";"
|
sfdisk -X gpt "/dev/${disk}" <<< ";"
|
||||||
|
print "waiting for 1 second so that partitions show up in /dev"
|
||||||
|
sleep 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
part="$(lsblk -l -o name | (grep "${disk}." || true) | head -n1)"
|
part="$(lsblk -l -o name | (grep "${disk}." || true) | head -n1)"
|
||||||
|
|
Loading…
Reference in New Issue