Comment 3 for bug 1641832

Revision history for this message
Steve Langasek (vorlon) wrote :

The following seems like it should be a non-destructive reproducer case for the bug, based tightly on the original example, but it also doesn't let me reproduce the problem - the 'cleanup' trap definitely still triggers.

$ sudo bash -ec 'src="$1"; img="$2"; trgmp="$3";
    mounts=""
    cleanup() { for m in $mounts; do echo umount "$m"; done; }
    trap cleanup EXIT
    echo mount -o loop "$img" "$trgmp"
    mounts="$trgmp"
    echo unsquashfs -force -xattrs -dest "$trgmp" "$src"' "squashimg-to-image" foo bar baz
mount -o loop bar baz
unsquashfs -force -xattrs -dest baz foo
umount baz
$