From 036b3a89556ef244feea9156ed3381e29a3e7e6a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benedikt=20B=C3=B6hm?= Date: Sat, 18 Feb 2012 17:01:08 +0100 Subject: [PATCH 1/1] do not cleanup cgroup mount points --- scripts/vserver.functions | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/vserver.functions b/scripts/vserver.functions index e00ce74..808fcd1 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -1416,11 +1416,19 @@ function _namespaceCleanup done done + # keep cgroup mount points + list=( "${list[@]}" "${CGROUP_MNT}" ) + if test -n "$CGROUP_MNT_PER_SS"; then + for ss in "${CGROUP_SUBSYS[@]}"; do + list=( "${list[@]}" "${CGROUP_MNT}/${ss}" ) + done + fi + local -a list_umount while read -r dev path opts; do test -n "$path" || continue - for i in "$root" /dev /proc; do - path_dir="${path}/" + path_dir="${path}/" + for i in "$root" /dev /proc /sys; do test "${path_dir#${i}/}" != "${path_dir}" && continue 2 done for i in "${list[@]}" /; do -- 1.8.1.5