Use status for the process count instead since persistent adds a task there.
[util-vserver.git] / scripts / vserver
index 74e1da2..f4080a6 100755 (executable)
@@ -153,7 +153,7 @@ SELF=( "$0" "${OPTION_ALL[@]}" )
 vserver=$1
 cmd=$2
 
-test "$cmd" != build || { shift 2; exec $_VNAMESPACE --new --
+test "$cmd" != build || { shift 2; exec $_VNAMESPACE --new -- \
     "$_VSERVER_BUILD" $OPTION_DEBUG -n "$vserver" "$@"; }
 
 
@@ -206,6 +206,9 @@ test "$2" != enter -a "$2" != stop || \
     ! isVserverRunning "$VSERVER_DIR" || \
     exec $_VNAMESPACE --enter "$VSERVER_DIR" -- $_VSERVER ----nonamespace "${OPTIONS_ORIG[@]}"
 
+set_init_cwd
+cd /
+
 . $__PKGLIBDIR/vserver.functions
 case "$2" in
     (start|stop|delete)