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
|
local size
|
||||||
size=$(qemu-img info -f "${disk_type}" --output json "${disk_img}" | \
|
size=$(qemu-img info -f "${disk_type}" --output json "${disk_img}" | \
|
||||||
gawk 'match($0, /"virtual-size": ([0-9]+),/, val) {print val[1]}' ; \
|
jq --raw-output '.["virtual-size"]' ; exit ${PIPESTATUS[0]})
|
||||||
exit ${PIPESTATUS[0]})
|
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
die_notrace "assert failed: could not read image size"
|
die_notrace "assert failed: could not read image size"
|
||||||
fi
|
fi
|
||||||
|
@ -108,7 +108,7 @@ if [[ ! -b "${LOOP_DEV}p1" ]]; then
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
warn "looback device node still ${LOOP_DEV}p1 missing, reprobing..."
|
warn "looback device node still ${LOOP_DEV}p1 missing, reprobing..."
|
||||||
blockdev --rereadpt ${LOOP_DEV}
|
sudo blockdev --rereadpt ${LOOP_DEV}
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
if [[ ! -b "${LOOP_DEV}p1" ]]; then
|
if [[ ! -b "${LOOP_DEV}p1" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user