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

Mike Gabriel sunweaver at alioth.debian.org
Wed Oct 23 09:24:17 UTC 2013


The branch, master has been updated
       via  c139ca0dd762437ce8058cbf06510edb97506c18 (commit)
      from  2c6ff66f267ed8f45671b55f29f3fbd5d9509c00 (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 c139ca0dd762437ce8058cbf06510edb97506c18
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Wed Jan 4 18:15:32 2012 +0000

    Do not shut down if uptime is less then an hour.  Based on patch and
    idea from Jonathan Jackson in BTS report #619950.
    
    git-svn-id: svn+ssh://svn.debian.org/svn/debian-edu/trunk/src/shutdown-at-night@74928 6e500793-9bee-0310-a5b0-9d0909bd054d

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

Summary of changes:
 debian/changelog  |    7 +++++++
 shutdown-at-night |    4 ++++
 2 files changed, 11 insertions(+)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index f790f91..e3fe494 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+shutdown-at-night (0.10) UNRELEASED; urgency=low
+
+  * Do not shut down if uptime is less then an hour.  Based on patch and
+    idea from Jonathan Jackson in BTS report #619950.
+
+ -- Petter Reinholdtsen <pere at debian.org>  Wed, 04 Jan 2012 19:15:04 +0100
+
 shutdown-at-night (0.9) unstable; urgency=low
 
   * Sync with Ubuntu version 0.8ubuntu1:
diff --git a/shutdown-at-night b/shutdown-at-night
index 598bf06..7e150d5 100755
--- a/shutdown-at-night
+++ b/shutdown-at-night
@@ -66,6 +66,10 @@ is_host_unused() {
     if [ "$(who)" ] ||  ps -efwww | egrep -q ' ssh .*LTSP_CLIEN[T]' ; then
 	return 1
     fi
+    # Uptime is less than one hour
+    if (( $(cat /proc/uptime  | awk '{print int($1)}') < 3600 )) ; then
+        return 1
+    fi
     return 0
 }
 


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