Alexander Gerasiov wrote:
Package: util-vserver
Version: 0.30.211-4
Severity: important

When my current dir is /home/gq, I run #vserver server start
I get:
=====
/usr/lib/util-vserver/vserver.functions: line 696: popd: /home/gq: No
such file or directory


Failed to start vserver 'server'
======
As i see in vserver.functions the problem is in the following code:

## Usage: prepareInit <vserver-directory>
function prepareInit
{
    pushd "$1/vdir" >/dev/null
    case "$INITSTYLE" in
        sysv)
            { find var/run  ! -type d -print0; \
              find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH
rm
            ;;
        plain)
            $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || :
            : | $_CHROOT_SH truncate fastboot  2>/dev/null || :
            ;;
        minit)
            ;;
    esac
    "[EMAIL PROTECTED]"
    popd >/dev/null
}

After chroot the directory /home/gq does not exists (inside vserver),
popd fails and vserver doesn't want to start.

/home on the host is on a separate filesystem, right? I suppose the cwd should be added to the list of paths to exclude from namespace cleanup, would it be possible for you to test the attached fix (patch -d/usr/lib*/util-vserver -p1 < delta-nsc-cwd.diff)?

--
Daniel Hokka Zakrisson
GPG id: 06723412
GPG fingerprint: A455 4DF3 990A 431F FECA  7947 6136 DDA2 0672 3412
Index: scripts/vserver.functions
===================================================================
--- scripts/vserver.functions	(revision 2410)
+++ scripts/vserver.functions	(working copy)
@@ -1199,7 +1199,7 @@
 
     # these are things that have to be accessible post-cleanup
     for tmp in "$root" "$__SBINDIR" "$__PKGLIBDIR" "$vdir" \
-	"$__PKGSTATEDIR" "[EMAIL PROTECTED]"; do
+	"$__PKGSTATEDIR" "[EMAIL PROTECTED]" "`pwd`"; do
 	while test -n "$tmp"; do
 	    list=( "[EMAIL PROTECTED]" "$tmp" )
 	    tmp="${tmp%/*}"

Reply via email to