diff options
Diffstat (limited to 'util-vserver/patches/0.30.211-r1/025_all_namespace-cleanup.patch')
-rw-r--r-- | util-vserver/patches/0.30.211-r1/025_all_namespace-cleanup.patch | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/util-vserver/patches/0.30.211-r1/025_all_namespace-cleanup.patch b/util-vserver/patches/0.30.211-r1/025_all_namespace-cleanup.patch deleted file mode 100644 index a952f9d..0000000 --- a/util-vserver/patches/0.30.211-r1/025_all_namespace-cleanup.patch +++ /dev/null @@ -1,99 +0,0 @@ -Index: scripts/vserver.functions -=================================================================== ---- scripts/vserver.functions (revision 2356) -+++ scripts/vserver.functions (revision 2357) -@@ -805,7 +805,7 @@ - _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" - - isNamespaceCleanup "$cfgdir" && \ -- _namespaceCleanup -+ _namespaceCleanup "$cfgdir" - - isAvoidNamespace "$cfgdir" || \ - $_SECURE_MOUNT --rbind -n "$vdir" "/" -@@ -1161,26 +1161,39 @@ - - function _namespaceCleanup - { -- local root=$(readlink -f "$vdir") -- local tmp="$root" -+ local vdir="$1" -+ local root=$($_VSERVER_INFO "$1" VDIR 1) - local -a list -- while [ "$tmp" ]; do -- list=( "${list[@]}" "$tmp" ) -- tmp="${tmp%/*}" -+ local -a skip -+ local tmp -+ -+ getFileArray skip "$vdir"/namespace-cleanup-skip \ -+ "$__CONFDIR"/.defaults/namespace-cleanup-skip || : -+ -+ # these are things that have to be accessible post-cleanup -+ for tmp in "$root" "$__SBINDIR" "$__PKGLIBDIR" "$vdir" \ -+ "$__PKGSTATEDIR" "${skip[@]}"; do -+ while test -n "$tmp"; do -+ list=( "${list[@]}" "$tmp" ) -+ tmp="${tmp%/*}" -+ done - done -+ - local -a list_umount - while read dev path opts; do -- [ "$path" ] || continue -- for i in "$root" /dev /proc; do -- [ "${path#$i}" != "$path" ] && continue 2 -- done -- for i in "${list[@]}" /; do -- [ "$path" = "$i" ] && continue 2 -- done -- list_umount=( "${list_umount[@]}" "$path" ) -+ test -n "$path" || continue -+ for i in "$root" /dev /proc; do -+ test "${path#$i}" != "$path" && continue 2 -+ done -+ for i in "${list[@]}" /; do -+ test "$path" = "$i" && continue 2 -+ done -+ # unmount them in reverse order so mounts further down the tree get unmounted first -+ list_umount=( "$path" "${list_umount[@]}" ) - 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" - done - } - -Index: doc/configuration.xml -=================================================================== ---- doc/configuration.xml (revision 2356) -+++ doc/configuration.xml (revision 2357) -@@ -45,6 +45,12 @@ - </description> - </boolean> - -+ <list id="global-namespace-cleanup-skip" name="namespace-cleanup-skip"> -+ <description> -+List of paths to skip during namespace cleanup. -+ </description> -+ </list> -+ - <link name="run.rev"> - <description> - Path of the vserver run reverse directory. This directory contains -@@ -381,6 +387,14 @@ - </description> - </boolean> - -+ <list name="namespace-cleanup-skip"> -+ <description> -+List of paths to skip during namespace cleanup. This overrides the -+<optionref ref="global-namespace-cleanup-skip">global namespace-cleanup-skip</optionref> -+file. -+ </description> -+ </list> -+ - <hash name="schedule"> - <description> - [experimental; name is subject of possible change] Contains the |