SOURCES: util-vserver-0.30.210-namespace-cleanup.patch - updated f...

glen glen at pld-linux.org
Thu Jun 15 20:49:28 CEST 2006


Author: glen                         Date: Thu Jun 15 18:49:28 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated from upstream

---- Files affected:
SOURCES:
   util-vserver-0.30.210-namespace-cleanup.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/util-vserver-0.30.210-namespace-cleanup.patch
diff -u SOURCES/util-vserver-0.30.210-namespace-cleanup.patch:1.1 SOURCES/util-vserver-0.30.210-namespace-cleanup.patch:1.2
--- SOURCES/util-vserver-0.30.210-namespace-cleanup.patch:1.1	Mon May 29 20:52:52 2006
+++ SOURCES/util-vserver-0.30.210-namespace-cleanup.patch	Thu Jun 15 20:49:23 2006
@@ -54,12 +54,12 @@
 +{
 +    local cfgdir
 +
-+    $_VSERVER_INFO - FEATURE namespace   || return 0
-+    cfgdir=$($_VSERVER_INFO "$1" CFGDIR) || return 0
-+    test -e "$cfgdir"/nonamespace-cleanup && return 0
++    $_VSERVER_INFO - FEATURE namespace   || return 1
++    cfgdir=$($_VSERVER_INFO "$1" CFGDIR) || return 1
++    test -e "$cfgdir"/nonamespace-cleanup && return 1
 +    test -e "$__CONFDIR"/.defaults/namespace-cleanup -o \
-+         -e "$cfgdir"/namespace-cleanup && return 1
-+    return 0
++         -e "$cfgdir"/namespace-cleanup && return 0
++    return 1
 +}
 +
  ## Usage: getAllVservers <var> [<KIND>*]
@@ -79,7 +79,7 @@
      _mountVserverInternal "$cfgdir"/fstab.local
      _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}"
  
-+    isNamespaceCleanup "$cfgdir" || \
++    isNamespaceCleanup "$cfgdir" && \
 +        _namespaceCleanup
 +
      isAvoidNamespace "$cfgdir" || \
@@ -94,24 +94,24 @@
 +{
 +    local root=$(readlink -f "$vdir")
 +    local tmp="$root"
-+    local list=""
++    local -a list
 +    while [ "$tmp" ]; do
-+	list="$list $tmp"
++	list=( "${list[@]}" "$tmp" )
 +	tmp="${tmp%/*}"
 +    done
-+    local list_umount=""
++    local -a list_umount
 +    while read dev path opts; do
 +        [ "$path" ] || continue
-+        for i in $root /dev /proc; do
++        for i in "$root" /dev /proc; do
 +            [ "${path#$i}" != "$path" ] && continue 2
 +        done
-+        for i in $list /; do
++        for i in "${list[@]}" /; do
 +            [ "$path" = "$i" ] && continue 2
 +        done
-+        list_umount="$path $list_umount"
++        list_umount=( "${list_umount[@]}" "$path" )
 +    done < /proc/mounts
-+    for i in $list_umount; do
-+        umount $i
++    for i in "${list_umount[@]}"; do
++        umount -l -n "$i"
 +    done
 +}
 +
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/util-vserver-0.30.210-namespace-cleanup.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list