Make fstab usage consistent, fstab gets mounted first, then
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 12 Sep 2006 10:47:38 +0000 (10:47 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 12 Sep 2006 10:47:38 +0000 (10:47 +0000)
fstab.local and then fstab.remote, unmounting in the reverse order.

git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2291 94cd875c-1c1d-0410-91d2-eb244daf1a30

scripts/pkgmgmt
scripts/vserver.functions

index 04ddd42..5cf54dc 100755 (executable)
@@ -160,8 +160,9 @@ function _mountFilesystems()
     }
     test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$1"
     
-    _mountFilesystemsInternal "$cfgdir"/fstab       $_CHBIND "${CHBIND_OPTS[@]}" || return 1
-    _mountFilesystemsInternal "$cfgdir"/fstab.local $_CHBIND "${CHBIND_OPTS[@]}" || return 1
+    _mountFilesystemsInternal "$cfgdir"/fstab                                     || return 1
+    _mountFilesystemsInternal "$cfgdir"/fstab.local                               || return 1
+    _mountFilesystemsInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || return 1
 }
 
 function _umountFilesystems()
@@ -176,8 +177,9 @@ function _umountFilesystems()
     test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$1"
 
     pushd "$vdir/" >/dev/null || return 1
-       _umountVserverInternal  "$cfgdir"/fstab.local                              || is_ok=
-       _umountVserverInternal  "$cfgdir"/fstab       $_CHBIND "${CHBIND_OPTS[@]}" || is_ok=
+       _umountVserverInternal  "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || is_ok=
+       _umountVserverInternal  "$cfgdir"/fstab.local                               || is_ok=
+       _umountVserverInternal  "$cfgdir"/fstab                                     || is_ok=
     popd >/dev/null           || return 1
     
     test -n "$is_ok"
index 09c6ee3..c71c761 100644 (file)
@@ -783,12 +783,14 @@ function umountVserver
 
     isAvoidNamespace "$cfgdir"    || return 0
     test -e "$cfgdir"/fstab -o \
-         -e "$cfgdir"/fstab.local || return 0
+         -e "$cfgdir"/fstab.local -o \
+         -e "$cfgdir"/fstab.remote || return 0
     test -n "$_HAVE_CHBIND_OPTIONS"  || _generateChbindOptions "$cfgdir"
     
     pushd "$vdir/" >/dev/null || return 1
-       _umountVserverInternal  "$cfgdir"/fstab.local                              || is_ok=
-       _umountVserverInternal  "$cfgdir"/fstab       $_CHBIND "${CHBIND_OPTS[@]}" || is_ok=
+       _umountVserverInternal  "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || is_ok=
+       _umountVserverInternal  "$cfgdir"/fstab.local                               || is_ok=
+       _umountVserverInternal  "$cfgdir"/fstab                                     || is_ok=
     popd >/dev/null           || return 1
 
     test -n "$is_ok"