From a66a8f8029c45dfdd6d70c401a6dca6402eaab33 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Tue, 10 Jun 2014 01:44:26 +0200 Subject: [PATCH] 66-autoport-chroot: fix finding log path for autodist user special case --- etc/cron.hourly/66-autoport-chroot | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/etc/cron.hourly/66-autoport-chroot b/etc/cron.hourly/66-autoport-chroot index a6eb1be..23e8c63 100755 --- a/etc/cron.hourly/66-autoport-chroot +++ b/etc/cron.hourly/66-autoport-chroot @@ -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