66-autoport-chroot: fix finding log path for autodist user special case

This commit is contained in:
Silvan Calarco 2014-06-10 01:44:26 +02:00
parent 2dd4d2632d
commit a66a8f8029

View File

@ -72,10 +72,12 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
if [ "${AUTOPORT_CHROOT[$i]}" ]; then
echo "= Working on $r(${AUTOPORT_CHROOT[$i]}) in chroot mode..." >> $LOGFILE
[[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Working on $r(${AUTOPORT_CHROOT[$i]}) in chroot mode" >> $LOGFILE
#echo "DEBUG: $CMD_PREFIX /usr/sbin/chroot /var/autoport/${AUTOPORT_CHROOT[$i]} su -l ${AUTOPORT_CHROOT_USER[$i]} -c \"autoport -b -r $r\"" >> $LOGFILE
$CMD_PREFIX /usr/sbin/chroot /var/autoport/${AUTOPORT_CHROOT[$i]} su -l ${AUTOPORT_CHROOT_USER[$i]} -c "autoport -b -r $r" >> $LOGFILE
cat /var/autoport/${AUTOPORT_CHROOT[$i]}/home/${AUTOPORT_CHROOT_USER[$i]}/.autoport/${AUTOPORT_ARCH[$i]}/$r-current.log >> $LOGFILE
#echo "DEBUG: cat /var/autoport/${AUTOPORT_CHROOT[$i]}/home/${AUTOPORT_CHROOT_USER[$i]}/.autoport/${AUTOPORT_ARCH[$i]}/$r-current.log" >> $LOGFILE
if [ "${AUTOPORT_CHROOT[$i]}" = "autodist" ]; then
cat /var/autoport/${AUTOPORT_CHROOT[$i]}/var/autodist/.autoport/${AUTOPORT_ARCH[$i]}/$r-current.log >> $LOGFILE
else
cat /var/autoport/${AUTOPORT_CHROOT[$i]}/home/${AUTOPORT_CHROOT_USER[$i]}/.autoport/${AUTOPORT_ARCH[$i]}/$r-current.log >> $LOGFILE
fi
fi
# if [ "${AUTOPORT_NATIVE[$i]}" ]; then