X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvserver.functions;h=a79a310ae2ba519dbfe9b5fe6d6bd108a59be3a9;hb=e11269f5d0b9fc622e14570d1274d85223d10567;hp=e00ce74cc12b69ca2fc89bfb1a2a00c811be19f8;hpb=17ff67ea057bc6e8bcd831341ee243348a9ee57d;p=util-vserver.git diff --git a/scripts/vserver.functions b/scripts/vserver.functions index e00ce74..a79a310 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -355,7 +355,7 @@ function _generateInitOptions ! isNumber "${RUNLEVEL_START:-3}" || INITCMD_PREPARE=( $_FAKE_RUNLEVEL "${RUNLEVEL_START:-3}" /var/run/utmp ) ;; - (xgentoo) + (xgentoo|xopenrc) test -n "$RUNLEVEL_START" || RUNLEVEL_START="default" RC_PATH=/usr/sbin:/usr/bin:/sbin:/bin @@ -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