[debian-edu-commits] debian-edu/ 06/07: shutdown-at-night: Add support for a blockage file that prevents from the system being woken up by NVRAM or RTC alarm.

Mike Gabriel sunweaver at debian.org
Tue Feb 23 20:51:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository shutdown-at-night.

commit 4be40980e421d6042ce15f90662a45593d7e53be
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Feb 23 21:47:31 2016 +0100

    shutdown-at-night: Add support for a blockage file that prevents from the system being woken up by NVRAM or RTC alarm.
---
 debian/changelog  | 2 ++
 shutdown-at-night | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 6962924..bbfd8c6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ shutdown-at-night (0.17) UNRELEASED; urgency=medium
     + Adjust the code to make configuration possible.
 
   [ Mike Gabriel ]
+  * shutdown-at-night: Add support for a blockage file that prevents from
+    the system being woken up by NVRAM or RTC alarm.
   * wakeupclients: Add support for a blockage file that prevents from
     other clients being woken up.
   * shutdown-at-night: Suppress wakeonlan output to stderr.
diff --git a/shutdown-at-night b/shutdown-at-night
index ae186b4..0118b1b 100755
--- a/shutdown-at-night
+++ b/shutdown-at-night
@@ -83,7 +83,10 @@ in_shutdown_netgroup() {
 
 wakeup_enabled_for_host() {
     # Flag for now
-    if [ -f /etc/shutdown-at-night/shutdown-at-night ]; then
+    if [ -f /etc/shutdown-at-night/shutdown-at-night-nowakeup-self ]; then
+        logger -t shutdown-at-night "Blocking NVRAM/RTC based wake-up of client $hostname (myself); remove /etc/shutdown-at-night/shutdown-at-night-nowakeup-self if wanted otherwise."
+        return 1
+    elif [ -f /etc/shutdown-at-night/shutdown-at-night ]; then
         return 0
     elif in_nowakeup_netgroup; then
         return 1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/shutdown-at-night.git



More information about the debian-edu-commits mailing list