"Fix" race condition in riju-init-volume

This commit is contained in:
Radon Rosborough 2021-06-11 21:25:36 -07:00
parent b9e0d4049c
commit 2ba198b645
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,8 @@ print "volume has ${num_parts} partition(s)"
if [[ "${num_parts}" != 1 ]]; then
print "repartitioning so we have exactly one partition"
sfdisk -X gpt "/dev/${disk}" <<< ";"
print "waiting for 1 second so that partitions show up in /dev"
sleep 1
fi
part="$(lsblk -l -o name | (grep "${disk}." || true) | head -n1)"