Hi,

On Jan 9, 2008 1:24 AM, Jens Thiele <[EMAIL PROTECTED]> wrote:
> the test in lh_chroot_devpts:80 fails for me
>
>     77                  # Unmounting /dev/pts
>     78                  if [ "${LH_USE_FAKEROOT}" != "enabled" ]
>     79                  then
>     80                          if [ -e chroot/dev/pts/0 ]
>     81                          then
>     82                                  ${LH_ROOT_COMMAND} umount 
> chroot/dev/pts
>     83                          fi
>     84                  fi
>
> I suggest either improving the test wether dev/pts is mounted or simply
> remove the test?

Similarly, it fails to detect sysfs being mounted in my OpenVZ VE
where there's no /sys/kernel/....

I've fixed it with stat(1) as follows, but using mountpoint(1) would
be sufficient as mentioned in debian-live-devel list.

diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index ad578cc..fa7244c 100755
--- a/helpers/lh_binary_chroot
+++ b/helpers/lh_binary_chroot
@@ -59,7 +59,7 @@ then
        fi
 fi

-if [ -d chroot/sys/kernel ]
+if [ "$(stat -fc %T chroot/sys)" = sysfs ]
 then
        if [ "${LH_USE_FAKEROOT}" != "enabled" ]
        then
diff --git a/helpers/lh_chroot_sysfs b/helpers/lh_chroot_sysfs
index 04e67de..fa9d74f 100755
--- a/helpers/lh_chroot_sysfs
+++ b/helpers/lh_chroot_sysfs
@@ -81,7 +81,7 @@ case "${1}" in
                then
                        # Unmounting /sys
                        #fuser -km chroot/sys
-                       if [ -e chroot/sys/kernel ]
+                       if [ "$(stat -fc %T chroot/sys)" = sysfs ]
                        then
                                ${LH_ROOT_COMMAND} umount chroot/sys
                        fi

-- 
YAEGASHI Takeshi <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>




_______________________________________________
debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to