mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-11 06:56:58 +02:00
commit
1fd2062df9
@ -169,8 +169,7 @@ assert_image_size() {
|
||||
|
||||
local size
|
||||
size=$(qemu-img info -f "${disk_type}" --output json "${disk_img}" | \
|
||||
gawk 'match($0, /"virtual-size": ([0-9]+),/, val) {print val[1]}' ; \
|
||||
exit ${PIPESTATUS[0]})
|
||||
jq --raw-output '.["virtual-size"]' ; exit ${PIPESTATUS[0]})
|
||||
if [[ $? -ne 0 ]]; then
|
||||
die_notrace "assert failed: could not read image size"
|
||||
fi
|
||||
|
@ -108,7 +108,7 @@ if [[ ! -b "${LOOP_DEV}p1" ]]; then
|
||||
break
|
||||
fi
|
||||
warn "looback device node still ${LOOP_DEV}p1 missing, reprobing..."
|
||||
blockdev --rereadpt ${LOOP_DEV}
|
||||
sudo blockdev --rereadpt ${LOOP_DEV}
|
||||
sleep 0.5
|
||||
done
|
||||
if [[ ! -b "${LOOP_DEV}p1" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user