lb_chroot_layered: if the unmount of the chroot mountpoint fails, dump mount information for debugging.

canary-as-default
Steve Langasek 1 year ago
parent 5a0909dd20
commit b30e7e4146

2
debian/changelog vendored

@ -2,6 +2,8 @@ livecd-rootfs (23.10.27) UNRELEASED; urgency=medium
* Add ubuntu to the list of targets we autopkgtest for on amd64, to ensure
coverage of the lb_chroot_layered behavior.
* lb_chroot_layered: if the unmount of the chroot mountpoint fails, dump
mount information for debugging.
-- Steve Langasek <steve.langasek@ubuntu.com> Tue, 29 Aug 2023 10:32:35 -0700

@ -268,7 +268,13 @@ create_chroot_pass () {
lb chroot_devpts remove ${*}
if [ -n "$lowerdirs" ]; then
umount chroot
res=0
umount chroot || res=$?
if [ $res -ne 0 ]; then
Echo_message "Unmount failed, current mounts: "
cat /proc/$$/mounts
exit $res
fi
rmdir chroot
else
rm chroot

Loading…
Cancel
Save