autodist: sync with current cron files with little changes

This commit is contained in:
Silvan Calarco 2013-05-21 01:39:06 +02:00
parent a218041054
commit 53163c856a
3 changed files with 7 additions and 7 deletions

View File

@ -4,11 +4,11 @@
function clean() { function clean() {
dir=$1 dir=$1
arch=$2 arch=$2
find $dir/RPM/RPMS/$arch/ -maxdepth 1 -ctime +30 -exec rm -rf {} \; find $dir/RPM/RPMS/$arch/ -maxdepth 1 -ctime +21 -exec rm -rf {} \;
find $dir/RPM/RPMS/noarch/ -maxdepth 1 -ctime +30 -exec rm -rf {} \; find $dir/RPM/RPMS/noarch/ -maxdepth 1 -ctime +21 -exec rm -rf {} \;
find $dir/RPM/BUILD/ -maxdepth 1 -ctime +30 -exec rm -rf {} \; find $dir/RPM/BUILD/ -maxdepth 1 -ctime +21 -exec rm -rf {} \;
find $dir/RPM/SOURCES/ -maxdepth 1 -ctime +120 -exec rm -rf {} \; find $dir/RPM/SOURCES/ -maxdepth 1 -ctime +120 -a ! -name "*.patch" -exec rm -rf {} \;
find $dir/RPM/SRPMS/ -maxdepth 1 -ctime +90 -exec rm -rf {} \; find $dir/RPM/SRPMS/ -maxdepth 1 -ctime +48 -exec rm -rf {} \;
} }
for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do

View File

@ -8,7 +8,7 @@
ME=`basename $0` ME=`basename $0`
[ "$$" == "`pidof -x $ME`" -o "$$" == "`pidof -x 60-autodist-update`" ] || { [ "$$" == "`pidof -x $ME`" -o "$$" == "`pidof -x 60-autodist-update`" ] || {
echo "Warning: $ME script already running; exiting." # echo "Warning: $ME script already running; exiting."
exit 0 exit 0
} }

View File

@ -77,7 +77,7 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
LANG=C smart update > /dev/null LANG=C smart update > /dev/null
LANG=C smart upgrade -y >> $LOGFILE LANG=C smart upgrade -y >> $LOGFILE
echo "= Working on $r($a) in native mode" >> $LOGFILE echo "= Working on $r($a) in native mode" >> $LOGFILE
su -l autodist -c "autoport -b -r $r" >> $LOGFILE su -l ${AUTOPORT_CHROOT_USER[$i]} -c "$CMD_PREFIX autoport -b -r $r" >> $LOGFILE
cat /var/autodist/.autoport/$a/$r-current.log >> $LOGFILE cat /var/autodist/.autoport/$a/$r-current.log >> $LOGFILE
fi fi