mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-11 02:41:33 +00:00
Merge branch 'kpartx-fun' of git+ssh://git.launchpad.net/~mwhudson/livecd-rootfs/+git/livecd-rootfs into ubuntu/master
This commit is contained in:
commit
1979e61c36
@ -14,18 +14,12 @@ clean_loops() {
|
|||||||
local kpartx_stdout
|
local kpartx_stdout
|
||||||
|
|
||||||
if [ -n "${backing_img}" ]; then
|
if [ -n "${backing_img}" ]; then
|
||||||
# sync before removing loop to avoid "Device or resource busy" errors
|
# If something just finished writing to the device or a
|
||||||
|
# partition (e.g. the zerofree in umount_partition) udev might
|
||||||
|
# still be processing the device.
|
||||||
|
udevadm settle
|
||||||
sync
|
sync
|
||||||
kpartx_ret=""
|
kpartx -v -d "${backing_img}"
|
||||||
kpartx_stdout=$(kpartx -v -d "${backing_img}") || kpartx_ret=$?
|
|
||||||
echo "$kpartx_stdout"
|
|
||||||
if [ -n "$kpartx_ret" ]; then
|
|
||||||
if echo "$kpartx_stdout" | grep -q "loop deleted"; then
|
|
||||||
echo "Suppressing kpartx returning error (#860894)"
|
|
||||||
else
|
|
||||||
exit $kpartx_ret
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
unset backing_img
|
unset backing_img
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user