webbuild-function: support for autodist user special case in chroot mode

This commit is contained in:
Live User 2013-01-19 21:06:45 +01:00
parent 1df35a2641
commit 0a7f28e6e3

View File

@ -264,7 +264,12 @@ function print_environment_descr() {
function environment_autoport_logdir() {
local env=$1
if [ "${AUTOPORT_CHROOT[$env]}" ]; then
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autoport/"
# FIXME: be able to detect real home without using chroot
if [ "${AUTOPORT_CHROOT_USER[$env]}" = "autodist" ]; then
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/var/autodist/.autoport/"
else
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autoport/"
fi
elif [ "${AUTOPORT_NATIVE[$env]}" ]; then
local envhome=`eval echo ~${AUTOPORT_CHROOT_USER[$env]}`
echo "$envhome/.autoport"