Bug in lh_mount_devpts
- Subject: Bug in lh_mount_devpts
- From: otavio at debian.org (Otavio Salvador)
- Date: Sat, 01 Dec 2007 08:59:32 -0200
- Message-id: <[🔎] 87zlwuel4b.fsf@lab.ossystems.com.br>
- In-reply-to: <2AB5E2596900E845AFD025D0F814531D021CE0BD@bnc-exchange.bnc.local> (Ben Mesman's message of "Fri\, 30 Nov 2007 11\:15\:01 +0100")
- References: <2AB5E2596900E845AFD025D0F814531D021CE0BD@bnc-exchange.bnc.local>
"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: