Teach vprocunhide about --write.
[util-vserver.git] / scripts / vserver.functions
index 26edb7b..0d02105 100644 (file)
@@ -757,8 +757,9 @@ function _generateSpaceOptions
     local vdir="$1"
     local d="$vdir"/spaces
 
-    test ! -e "$d"/pid || \
-      OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --pid )
+    ( test ! -e "$d"/pid &&
+      ! $_VSERVER_INFO PIDSPACE FEATURE ) || \
+       OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --pid )
 
     test ! -e "$d"/net || {
        OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --net )
@@ -1351,7 +1352,7 @@ function _namespaceCleanup
     done < /proc/mounts
     # separate loop to avoid races while reading /proc/mounts
     for i in "${list_umount[@]}"; do
-       $_UMOUNT -l -n "$i"
+       $_UMOUNT -l -n -i "$i"
     done
 }