From 762c798fbb6208be2ae96869a4439d08a478f065 Mon Sep 17 00:00:00 2001 From: rhatto Date: Tue, 23 Jan 2007 18:33:14 +0000 Subject: mkjail: small fix git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@117 04377dda-e619-0410-9926-eae83683ac58 --- lib/common.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index 4c337e2..4953041 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -93,7 +93,7 @@ function package_build { function install_packages { - local check installed unable_to_install + local check installed unable_to_install root # check if is time to clean the local repository if [ "$SIMPLARET_CLEAN" == "1" ]; then @@ -102,14 +102,16 @@ function install_packages { ARCH=$ARCH VERSION=$VERSION $SIMPLARET --purge -w $SIMPLARET_PURGE_WEEKS fi + root="$JAIL_ROOT/$server" + # now tries to install each package listed in the template for pack in `cat $TEMPLATE | grep -v -e "^#" | cut -d : -f 1`; do # try to install the package - ROOT=/$JAIL_ROOT ARCH=$ARCH VERSION=$VERSION $SIMPLARET --install $pack $extraoptions + ROOT=/$root ARCH=$ARCH VERSION=$VERSION $SIMPLARET --install $pack # check if the package was installed - installed=`eval "ls /$JAIL_ROOT/var/log/packages/ | egrep '^$pack-[^-]+-[^-]+-[^-]+$'"` + installed=`eval "ls /$root/var/log/packages/ | egrep '^$pack-[^-]+-[^-]+-[^-]+$'"` check=$? if [ ! -z "$installed" ] && [ "$check" == "0" ]; then @@ -130,7 +132,7 @@ function install_packages { fi if [ ! -z "$unable_to_install" ]; then - echo "mkjail was unable to install the following packages on $JAIL_ROOT:" + echo "mkjail was unable to install the following packages on $root:" echo -e "$unable_to_install" fi -- cgit v1.2.3