]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
mkjail: small fix
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Tue, 23 Jan 2007 18:33:14 +0000 (18:33 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Tue, 23 Jan 2007 18:33:14 +0000 (18:33 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@117 04377dda-e619-0410-9926-eae83683ac58

lib/common.sh

index 4c337e2182648f9e2b99071a5b14de6571d7d267..495304144289196415f770aad2ffef4226da6767 100644 (file)
@@ -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