[25364] in Source-Commits
/svn/athena r24926 - trunk/debathena/config/auto-update/debian
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Tue Jan 25 12:44:00 2011
Date: Tue, 25 Jan 2011 12:43:54 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201101251743.p0PHhsYP000608@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2011-01-25 12:43:54 -0500 (Tue, 25 Jan 2011)
New Revision: 24926
Modified:
trunk/debathena/config/auto-update/debian/athena-auto-update
trunk/debathena/config/auto-update/debian/athena-auto-upgrade
trunk/debathena/config/auto-update/debian/changelog
trunk/debathena/config/auto-update/debian/control.in
trunk/debathena/config/auto-update/debian/debathena-auto-update.cron.d
Log:
In auto-update:
* Don't depend on at, because bad things happen (Trac #782)
Modified: trunk/debathena/config/auto-update/debian/athena-auto-update
===================================================================
--- trunk/debathena/config/auto-update/debian/athena-auto-update 2011-01-23 10:45:03 UTC (rev 24925)
+++ trunk/debathena/config/auto-update/debian/athena-auto-update 2011-01-25 17:43:54 UTC (rev 24926)
@@ -67,6 +67,22 @@
trap 'rm -f $pidfile' EXIT
+if [ "$1" = "cron" ]; then
+ case `date +"%H"` in
+ 0[2-6])
+ # 2 hrs
+ interval=7200
+ ;;
+ *)
+ # 6 hrs
+ interval=21600
+ ;;
+ esac
+ if ! desync -t /var/run/athena-update.desync $interval; then
+ exit 0
+ fi
+fi
+
statfile="/var/lib/athena-update-status"
updstatus="unknown"
updmsg=""
Modified: trunk/debathena/config/auto-update/debian/athena-auto-upgrade
===================================================================
--- trunk/debathena/config/auto-update/debian/athena-auto-upgrade 2011-01-23 10:45:03 UTC (rev 24925)
+++ trunk/debathena/config/auto-update/debian/athena-auto-upgrade 2011-01-25 17:43:54 UTC (rev 24926)
@@ -67,6 +67,22 @@
fi
fi
+if [ "$1" = "cron" ]; then
+ interval=21600
+ shopt -s nocasematch
+ case `hostname` in
+ m38-370*)
+ interval=43200
+ ;;
+ w20-575*)
+ interval=28800
+ ;;
+ esac
+ if ! desync -t /var/run/athena-upgrade.desync $interval; then
+ exit 0
+ fi
+fi
+
CLUSTERINFO=`getcluster -b $(lsb_release -sr)`
[ $? != 0 ] && complain "Failed to get clusterinfo" && exit 1
eval $CLUSTERINFO
Modified: trunk/debathena/config/auto-update/debian/changelog
===================================================================
--- trunk/debathena/config/auto-update/debian/changelog 2011-01-23 10:45:03 UTC (rev 24925)
+++ trunk/debathena/config/auto-update/debian/changelog 2011-01-25 17:43:54 UTC (rev 24926)
@@ -1,3 +1,9 @@
+debathena-auto-update (1.20) unstable; urgency=low
+
+ * Don't depend on at, because bad things happen (Trac #782)
+
+ -- Jonathan Reed <jdreed@mit.edu> Tue, 25 Jan 2011 12:43:05 -0500
+
debathena-auto-update (1.19.1) unstable; urgency=low
* Don't chmod non-existent files
Modified: trunk/debathena/config/auto-update/debian/control.in
===================================================================
--- trunk/debathena/config/auto-update/debian/control.in 2011-01-23 10:45:03 UTC (rev 24925)
+++ trunk/debathena/config/auto-update/debian/control.in 2011-01-25 17:43:54 UTC (rev 24926)
@@ -7,6 +7,6 @@
Package: debathena-auto-update
Architecture: all
-Depends: ${misc:Depends}, bsdutils, debathena-desync, cron, at, aptitude, apt-file, kexec-tools
+Depends: ${misc:Depends}, bsdutils, debathena-desync, cron, aptitude, apt-file, kexec-tools
Description: Performs automatic updates for Athena machines.
This package performs automatic updates for Athena machines.
Modified: trunk/debathena/config/auto-update/debian/debathena-auto-update.cron.d
===================================================================
--- trunk/debathena/config/auto-update/debian/debathena-auto-update.cron.d 2011-01-23 10:45:03 UTC (rev 24925)
+++ trunk/debathena/config/auto-update/debian/debathena-auto-update.cron.d 2011-01-25 17:43:54 UTC (rev 24926)
@@ -1,8 +1,7 @@
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-#min hour mday mon wday user command
-0 2,4,6 * * * root echo "/usr/sbin/athena-auto-update cron" | at "now + $(desync -n 120) minutes" 2>&1 | egrep -v "(job [0-9]+ at)|(^warning: commands will be executed using /bin/sh)"
-0 8,14,20 * * * root echo "/usr/sbin/athena-auto-update cron" | at "now + $(desync -n 360) minutes" 2>&1 | egrep -v "(job [0-9]+ at)|(^warning: commands will be executed using /bin/sh)"
-0 2 * * * root echo "/usr/sbin/athena-auto-upgrade" | at "now + $(desync -n 360) minutes" 2>&1 | egrep -v "(job [0-9]+ at)|(^warning: commands will be executed using /bin/sh)"
+#min hour mday mon wday user command
+0,15,30,45 * * * * root /usr/sbin/athena-auto-update cron
+0 2 * * * root /usr/sbin/athena-auto-upgrade