[25411] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r24962 - trunk/debathena/config/auto-update/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Feb 17 12:46:01 2011

Date: Thu, 17 Feb 2011 12:45:54 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201102171745.p1HHjshN014187@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-02-17 12:45:54 -0500 (Thu, 17 Feb 2011)
New Revision: 24962

Modified:
   trunk/debathena/config/auto-update/debian/changelog
   trunk/debathena/config/auto-update/debian/debathena-auto-update.init
Log:
Prep for release

Modified: trunk/debathena/config/auto-update/debian/changelog
===================================================================
--- trunk/debathena/config/auto-update/debian/changelog	2011-02-17 15:59:21 UTC (rev 24961)
+++ trunk/debathena/config/auto-update/debian/changelog	2011-02-17 17:45:54 UTC (rev 24962)
@@ -1,4 +1,4 @@
-debathena-auto-update (1.21) UNRELEASED; urgency=low
+debathena-auto-update (1.21) unstable; urgency=low
 
   * Generate crontabs at configure time (Trac #791)
   * Run an update at boot time if it's been too long since the last one

Modified: trunk/debathena/config/auto-update/debian/debathena-auto-update.init
===================================================================
--- trunk/debathena/config/auto-update/debian/debathena-auto-update.init	2011-02-17 15:59:21 UTC (rev 24961)
+++ trunk/debathena/config/auto-update/debian/debathena-auto-update.init	2011-02-17 17:45:54 UTC (rev 24962)
@@ -13,6 +13,8 @@
 
 machtype -v -L | grep -q "debathena-cluster" || exit 0
 
+. /lib/lsb/init-functions
+
 case "$1" in
 start)
 	if [ -f /var/lib/athena-update-status ]; then
@@ -20,11 +22,25 @@
 	    time=$(date +%s)
 	    if echo $updlast | grep -q ^[0-9]*$; then
 		elapsed=`echo $time - $updlast | bc`
-		if [ $elapsed -le 21600 ]; then
+		if [ $elapsed -lt 86400 ]; then
 		    exit 0
 		fi
 	    fi
 	fi
-	/usr/sbin/athena-auto-update
+	log_action_msg "Workstation has not checked for an update in 24 hours"
+	log_action_msg "Forcing an update now (this can take up to 15 minutes)"
+	if /usr/sbin/athena-auto-update; then
+	    log_end_msg 0
+	else
+	    log_end_msg 1
+	fi
 	;;
+stop|restart|reload|force-reload|status)
+	exit 0
+	;;
+*)
+	log_action_msg "Usage: /etc/init.d/debathena-auto-update {start}"
+	exit 1
+	;;
 esac
+exit 0


home help back first fref pref prev next nref lref last post