[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug in lh_mount_devpts



"Ben Mesman (B&C Netservice)" <ben at bncnetservice.nl> writes:

> Hello,
>
> I found a bug in lh_mount_devpts. When I was trying to build a
> live-image, I got the following:
>
> ...
> P: Begin unmounting /sys...
> P: Begin unmounting /proc...
> P: Begin unmounting /dev/pts...
> P: Begin caching chroot stage...
> P: Begin copying chroot...
> P: This may take a while.
> P: Begin mounting /dev/pts...
> mount: devpts-live already mounted or chroot/dev/pts busy
> mount: according to mtab, devpts-live is mounted on
> /fs0/debianlive/ookjij/chroot/dev/pts
>
> I turns out than lh_mount_devpts is checking whether chroot/dev/pts/0
> exists before umounting. In this case there was no pts/0, so devpts was
> not umounted. However, devpts was mounted and pts/[1-6] existed. I
> patched lh_mount_devpts with something that works better, I hope.
>
> --- lh_chroot_devpts.orig       2007-11-30 09:34:09.000000000 +0100
> +++ lh_chroot_devpts    2007-11-30 09:36:28.000000000 +0100
> @@ -77,7 +77,7 @@
>  		# Unmounting /dev/pts
>  		if [ "${LH_USE_FAKEROOT}" != "enabled" ]
>  		then
> -			if [ -e chroot/dev/pts/0 ]
> +			if ls /dev/pts/[0-9] > /dev/null 2>&1

                  chroot/dev/pts/* ?

>  			then
>  				${LH_ROOT_COMMAND} umount chroot/dev/pts
>  			fi
>
> Greetings,
> Ben.
>
> _______________________________________________
> debian-live-devel mailing list
> debian-live-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel
>

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio at debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."



Reply to: