From: James Troup Date: Sun, 11 Jun 2006 05:25:51 +0000 (+0100) Subject: Fix up usage in cron scripts by adding new variable. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da564af9a40d05d078e5ec7e49c0c778ae08ea0e;p=dak Fix up usage in cron scripts by adding new variable. --- diff --git a/ChangeLog b/ChangeLog index d70447be..7dd06e2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2006-06-11 James Troup + * config/debian/vars (configdir): add new variable pointing to + this directory. + + * config/debian/cron.daily: use $configdir inplace of $masterdir + when that's what we mean, and don't cd into $masterdir just to run + dak scripts as we don't need to do that anymore. + * config/debian/cron.hourly: likewise. + * config/debian/cron.unchecked: likewise. + * config/debian/cron.weekly: likewise. + * config/debian/dak.conf (Import-Users-From-Passwd::KnownPostgres): temporarily add 'katie' user back to list of known users as it's non-trivial to entirely diff --git a/config/debian/cron.daily b/config/debian/cron.daily index 8aae0543..5d85823b 100755 --- a/config/debian/cron.daily +++ b/config/debian/cron.daily @@ -56,7 +56,6 @@ chmod 664 REPORT TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X) -cd $masterdir dak check-overrides rm -f $LOCKAC @@ -64,7 +63,6 @@ symlinks -d -r $ftpdir TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X) -cd $masterdir dak make-suite-file-list TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X) @@ -90,7 +88,7 @@ for i in main contrib non-free main.debian-installer; do cat override.sid.$i >> TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X) # Generate Packages and Sources files -cd $masterdir +cd $configdir apt-ftparchive generate apt.conf # Generate *.diff/ incremental updates dak generate-index-diffs @@ -168,7 +166,6 @@ echo Daily cron scripts successful. TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X) # Stats pr0n -cd $masterdir update-ftpstats $base/log/* > $base/misc/ftpstats.data R --slave --vanilla < $base/misc/ftpstats.R diff --git a/config/debian/cron.hourly b/config/debian/cron.hourly index 5a756fbd..8efa0e09 100644 --- a/config/debian/cron.hourly +++ b/config/debian/cron.hourly @@ -6,6 +6,5 @@ set -e export SCRIPTVARS=/org/ftp.debian.org/dak/config/debian/vars . $SCRIPTVARS -cd $masterdir dak import-users-from-passwd dak queue-report -n > $webdir/new.html diff --git a/config/debian/cron.unchecked b/config/debian/cron.unchecked index 124f7f6e..c018d51f 100644 --- a/config/debian/cron.unchecked +++ b/config/debian/cron.unchecked @@ -40,9 +40,9 @@ if lockfile -r3 $LOCKFILE; then cat override.sid.$i.src >> override.sid.all3.src fi done - cd $masterdir + cd $configdir apt-ftparchive -qq generate apt.conf.buildd - . $masterdir/cron.buildd + . $configdir/cron.buildd fi else echo "$timestamp": Nothing to do >> $report diff --git a/config/debian/cron.weekly b/config/debian/cron.weekly index fb5d207e..3624336c 100755 --- a/config/debian/cron.weekly +++ b/config/debian/cron.weekly @@ -16,7 +16,7 @@ fi # Clean up apt-ftparchive's databases -cd $masterdir +cd $configdir apt-ftparchive -q clean apt.conf apt-ftparchive -q clean apt.conf.buildd diff --git a/config/debian/vars b/config/debian/vars index c2bf377f..974ca12a 100644 --- a/config/debian/vars +++ b/config/debian/vars @@ -8,6 +8,7 @@ archs="alpha amd64 arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 sp scriptdir=$base/scripts masterdir=$base/dak/ +configdir=$base/dak/config/debian/ dbdir=$base/database/ lockdir=$base/lock/ overridedir=$scriptdir/override