On Sat, Oct 07, 2006 at 12:38:53AM +0200, Roland Stigge wrote: > the new sysvinit (on debootstrap) mounts /lib/init/rw, which is still mounted > when xen-create-image wants to clean up the tempdir. Since the umount of the > tempdir fails silently,
Ugh.
> the recursive rm is applied to the whole (still
> mounted) image, leaving only lib/init/rw and an unusable image. I propose the
> following patch:
That would work, but would leak large temporary directories in /tmp.
> if ( $mount =~ /$MOUNT_POINT/)
> {
> + runCommand( "umount $MOUNT_POINT/lib/init/rw" );
> runCommand( "umount $MOUNT_POINT" );
> + runCommand( "rmdir $MOUNT_POINT" );
> }
> }
I think that this is the better place to do it. Instead though
I would open /proc/mounts and unmount everything which is beneath
$MOUNT_POINT.
> (When further directories like lib/init/rw show up, we could factor out all
> those into a list + umount loop.)
Right - I'd do it like that right now, just in case anything else is
going to change.
> I can upload the package myself (and possibly adopt it), if you want,
> considering #390904. I'm going to use it frequently.
Feel free.
I will try to do a real loop and unmount fix over the next day or
two and make a new release but I have no objection to an upload
which will apply your temporary fix.
Steve
--
signature.asc
Description: Digital signature

