X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fpkgmgmt;h=c174991c7718cfefff4336b30abb3567f7b32453;hb=95e2774070e989fe9cf9f48dae5fa054e55e2a3e;hp=7d0745856680e5e436084deb3e75cc87adba7e60;hpb=3b34449070c0846fdc49436d1edd5916512f1644;p=util-vserver.git diff --git a/scripts/pkgmgmt b/scripts/pkgmgmt index 7d07458..c174991 100755 --- a/scripts/pkgmgmt +++ b/scripts/pkgmgmt @@ -1,5 +1,5 @@ #!/bin/bash -# $Id: pkgmgmt 2291 2006-09-12 10:47:38Z dhozac $ +# $Id: pkgmgmt 2599 2007-08-26 21:30:50Z dhozac $ # Copyright (C) 2004,2005 Enrico Scholz # @@ -23,6 +23,7 @@ test -e "$UTIL_VSERVER_VARS" || { } . "$UTIL_VSERVER_VARS" . "$_LIB_FUNCTIONS" +. "$_LIB_VSERVER_BUILD_FUNCTIONS" . "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" . "$__PKGLIBDIR/vserver.functions" @@ -54,7 +55,6 @@ function init() else rpmdb_mntpoint=/.rpmdb fi - pkgmgmt.initVariables } function _createDirs() @@ -160,9 +160,9 @@ function _mountFilesystems() } test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$1" - _mountFilesystemsInternal "$cfgdir"/fstab || return 1 - _mountFilesystemsInternal "$cfgdir"/fstab.local || return 1 - _mountFilesystemsInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || return 1 + _mountFilesystemsInternal "$cfgdir"/fstab || return 1 + _mountFilesystemsInternal "$cfgdir"/fstab.local || return 1 + _mountFilesystemsInternal "$cfgdir"/fstab.remote "${CHBIND_CMD[@]}" || return 1 } function _umountFilesystems() @@ -177,9 +177,9 @@ function _umountFilesystems() test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$1" pushd "$vdir/" >/dev/null || return 1 - _umountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || is_ok= - _umountVserverInternal "$cfgdir"/fstab.local || is_ok= - _umountVserverInternal "$cfgdir"/fstab || is_ok= + _umountVserverInternal "$cfgdir"/fstab.remote "${CHBIND_CMD[@]}" || is_ok= + _umountVserverInternal "$cfgdir"/fstab.local || is_ok= + _umountVserverInternal "$cfgdir"/fstab || is_ok= popd >/dev/null || return 1 test -n "$is_ok" @@ -398,6 +398,11 @@ function processVserver() echo $"Vserver '$vserver' does not seem to exist; skipping it..." return 1 } >&2 + + _setVserverDir "$vserver" + _setVserverName + _setVserverDirName + pkgmgmt.initVariables pkgmgmt.isInternal "$vserver" || is_external=1