aboutsummaryrefslogtreecommitdiff
path: root/lib/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common.sh')
-rw-r--r--lib/common.sh10
1 files 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