[debian-edu-commits] debian-edu/shutdown-at-night.git (#24) - master (branch) updated: fd5eaa825f377f07c175ebcb12cb374cde8d5d77

Mike Gabriel sunweaver at alioth.debian.org
Wed Oct 23 09:33:50 UTC 2013


The branch, master has been updated
       via  fd5eaa825f377f07c175ebcb12cb374cde8d5d77 (commit)
      from  b87fa4d1266dc22bc933c69a8ff7731d8810a7a5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fd5eaa825f377f07c175ebcb12cb374cde8d5d77
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sat Jun 14 22:56:48 2008 +0000

      * Make sure to not give the same wakeup time to all BIOSes, to avoid
        machines with good hardware clock to wake up at the same time and
        thus reduce the chance that a fuse breaks.
    
    git-svn-id: svn+ssh://svn.debian.org/svn/debian-edu/trunk/src/shutdown-at-night@41486 6e500793-9bee-0310-a5b0-9d0909bd054d

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog  |    8 ++++++++
 shutdown-at-night |    8 ++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 759d7ff..e8af74d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+shutdown-at-night (0.5) UNRELEASED; urgency=low
+
+  * Make sure to not give the same wakeup time to all BIOSes, to avoid
+    machines with good hardware clock to wake up at the same time and
+    thus reduce the chance that a fuse breaks.
+
+ -- Petter Reinholdtsen <pere at debian.org>  Sun, 15 Jun 2008 00:51:43 +0200
+
 shutdown-at-night (0.4) unstable; urgency=low
 
   * Make sure the /etc/shutdown-at-night/ directory is part of the
diff --git a/shutdown-at-night b/shutdown-at-night
index 7b02df6..4befaaf 100755
--- a/shutdown-at-night
+++ b/shutdown-at-night
@@ -1,4 +1,6 @@
-#!/bin/sh
+#!/bin/bash
+# Using /bin/bash and not /bin/sh to get a shell with support for random number
+# generation.
 #
 # Automatically turn off computers at night, defined as 16:00 - 06:00.
 # Should schedule wakeup in the morning.
@@ -28,7 +30,9 @@ enabled_for_host() {
 nvramwakeup() {
 # http://www.vdr-portal.de/board/thread.php?threadid=75582&sid=b7aced20e710aef12ffa56b5197fe168
     wakeuptime=$1
-    when=$(date +%s -d "tomorrow $wakeuptime")
+    # Spread the BIOS wakeup time across a 20 minute period, to avoid all of them
+    # waking up at the same time, killing a fuse.
+    when=$(( $(date +%s -d "tomorrow $wakeuptime") - 600 + $RANDOM % 1200))
 
     # Make sure HW clock is correct, as it is used to decide when to
     # wake up.


hooks/post-receive
-- 
shutdown-at-night.git (shutdown-at-night Debian package)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "shutdown-at-night.git" (shutdown-at-night Debian package).




More information about the debian-edu-commits mailing list