moved isAvoidNamespace() into main-functions file
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 14 Feb 2004 01:21:55 +0000 (01:21 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 14 Feb 2004 01:21:55 +0000 (01:21 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@893 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/functions
util-vserver/scripts/vserver.functions

index df8129f..a4a02a2 100644 (file)
@@ -237,6 +237,13 @@ function pkgInit
     _PKG_VSERVER=$vserver
 }
 
+function isAvoidNamespace
+{
+    test ! -e "$1"/namespace || return 1
+    test -e "$CONFDIR"/.defaults/nonamespace -o \
+         -e "$1"/nonamespace
+}
+
 function getAllVservers
 {
     local i
index a86303a..e02c0dd 100644 (file)
@@ -436,13 +436,6 @@ function generateOptions
     _generateChcontextOptions  "$1"
 }
 
-function _isAvoidNamespace
-{
-    test ! -e "$1"/namespace || return 1
-    test -e "$CONFDIR"/.defaults/nonamespace -o \
-         -e "$1"/nonamespace
-}
-
 function mountVserver
 {
     local cfgdir=$1
@@ -462,7 +455,7 @@ function mountVserver
     $_CHBIND "${CHBIND_OPTS[@]}" \
        $_SECURE_MOUNT -a --chroot "$vdir" --fstab "$cfgdir"/fstab
 
-    _isAvoidNamespace "$cfgdir" || \
+    isAvoidNamespace "$cfgdir" || \
        $_SECURE_MOUNT --rbind -n "$vdir" "/"
 }
 
@@ -473,7 +466,7 @@ function umountVserver
 
     is_ok=1
 
-    _isAvoidNamespace "$cfgdir"  || return 0
+    isAvoidNamespace "$cfgdir"  || return 0
     test -e "$cfgdir"/fstab      || return 0
     test "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir"