webbuild-functions: (re)implement log dir special case for autodist user in chroot environment

This commit is contained in:
Silvan Calarco 2013-05-22 00:21:18 +02:00
parent d99d231b47
commit d7fa8c819b

View File

@ -267,7 +267,11 @@ 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/"
if [ "${AUTOPORT_CHROOT_USER[$env]}" != "autodist" ]; then
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autoport/"
else
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/var/autodist/.autoport/"
fi
elif [ "${AUTOPORT_NATIVE[$env]}" ]; then
local envhome=`eval echo ~${AUTOPORT_CHROOT_USER[$env]}`
echo "$envhome/.autoport"
@ -277,8 +281,12 @@ function environment_autoport_logdir() {
function environment_logdir() {
local env=$1
if [ "${AUTOPORT_CHROOT[$env]}" ]; then
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autodist/log/"
elif [ "${AUTOPORT_NATIVE[$env]}" ]; then
if [ "${AUTOPORT_CHROOT_USER[$env]}" != "autodist" ]; then
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autodist/log/"
else
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/var/autodist/.autoport/"
fi
elif [ "${AUTOPORT_NATIVE[$env]}" -o "${AUTOPORT_CHROOT[$env]}" ]; then
local envhome=`eval echo ~${AUTOPORT_CHROOT_USER[$env]}`
if [ "${AUTOPORT_CHROOT_USER[$env]}" = "autodist" ]; then
echo "$envhome/log"