From: Daniel Hokka Zakrisson Date: Tue, 12 Sep 2006 10:47:38 +0000 (+0000) Subject: Make fstab usage consistent, fstab gets mounted first, then X-Git-Tag: release-0.30.211~64 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=816eac39a39ff4775f280cf8b2a45e07eb663002;p=util-vserver.git Make fstab usage consistent, fstab gets mounted first, then 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 --- diff --git a/scripts/pkgmgmt b/scripts/pkgmgmt index 04ddd42..5cf54dc 100755 --- a/scripts/pkgmgmt +++ b/scripts/pkgmgmt @@ -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" diff --git a/scripts/vserver.functions b/scripts/vserver.functions index 09c6ee3..c71c761 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -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"