[debian-edu-commits] debian-edu/ 28/64: * Adjust return value from nvramwakeup() in shutdown-at-night, to return success if the BIOS wakeup time was updated.

Mike Gabriel sunweaver at debian.org
Wed Oct 23 09:51:52 UTC 2013


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 09dc489dd3c2e32a384927dce013ad7b396f5605
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sun Jun 15 17:27:57 2008 +0000

      * Adjust return value from nvramwakeup() in shutdown-at-night, to
        return success if the BIOS wakeup time was updated.
    
    git-svn-id: svn+ssh://svn.debian.org/svn/debian-edu/trunk/src/shutdown-at-night@41508 6e500793-9bee-0310-a5b0-9d0909bd054d
---
 debian/changelog  |    2 ++
 shutdown-at-night |    8 ++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f1bfeb0..a881389 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ shutdown-at-night (0.5) UNRELEASED; urgency=low
   * Add comment in Makefile explaining why the internal scripts are in
     /usr/lib/ and not /usr/share/.
   * Improve copyright file on request from the Debian ftpmasters.
+  * Adjust return value from nvramwakeup() in shutdown-at-night, to
+    return success if the BIOS wakeup time was updated.
 
  -- Petter Reinholdtsen <pere at debian.org>  Sun, 15 Jun 2008 00:51:43 +0200
 
diff --git a/shutdown-at-night b/shutdown-at-night
index 4befaaf..480a212 100755
--- a/shutdown-at-night
+++ b/shutdown-at-night
@@ -42,8 +42,12 @@ nvramwakeup() {
     modprobe nvram
 
     # This require a supported motherboard
-    nvram-wakeup -s $when > /dev/null
-    logger -t shutdown-at-night "scheduled $hostname to turn itself on at $wakeuptime using nvram-wakeup."
+    if nvram-wakeup -s $when > /dev/null ; then
+        logger -t shutdown-at-night "scheduled $hostname to turn itself on at $wakeuptime using nvram-wakeup."
+        return 0
+    else
+        return 1
+    fi
 }
 
 prepare_wakeonlan() {

-- 
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