vdr/nvram-wakeup/debian S90.nvram-wakeup changelog vdr-nvram-wakeup.conf
Tobias Grimm
pkg-vdr-dvb-changes@lists.alioth.debian.org
Wed, 10 Nov 2004 23:53:17 +0000
Update of /cvsroot/pkg-vdr-dvb/vdr/nvram-wakeup/debian
In directory haydn:/tmp/cvs-serv23479/debian
Modified Files:
S90.nvram-wakeup changelog vdr-nvram-wakeup.conf
Log Message:
some changes in reboot handling
Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/nvram-wakeup/debian/changelog,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- changelog 26 Oct 2004 10:27:24 -0000 1.24
+++ changelog 10 Nov 2004 23:53:15 -0000 1.25
@@ -3,7 +3,11 @@
* Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
- Build-depend on dpatch (>= 2.0.9)
- Converted existing dpatch-files to the new short format
-
+ * Tobias Grimm <vdr@e-tobi.net>
+ - vdr shutdown hook will not set the time, if another hook script has
+ requested to postpone the shutdown
+ - Added option to the vdr shutdown hook, which allows to force a reboot
+ whenever nvram-wakup has set the time
-- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org> Tue, 26 Oct 2004 11:32:53 +0200
nvram-wakeup (0.97-3) unstable; urgency=low
Index: S90.nvram-wakeup
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/nvram-wakeup/debian/S90.nvram-wakeup,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- S90.nvram-wakeup 11 Oct 2004 18:03:07 -0000 1.3
+++ S90.nvram-wakeup 10 Nov 2004 23:53:15 -0000 1.4
@@ -18,6 +18,7 @@
[ -z "$SPECIALSHUTDOWN" ] && export SPECIALSHUTDOWN=""
[ -z "$REGULAR_DAYS" ] && export REGULAR_DAYS=0
[ -z "$REGULAR_TIME" ] && export REGULAR_TIME=0
+[ -z "$FORCE_REBOOT" ] && export FORCE_REBOOT="no"
LOG="logger -t vdr-nvram-wakeup"
@@ -26,6 +27,18 @@
exit 0
fi
+request_reboot()
+{
+ if [ -z "$SPECIALSHUTDOWN" ] ; then
+ $LOG "nvram-wakeup: A special shutdown strategy is required but not configured."
+ echo "ABORT_MESSAGE=\"no special shutdown configured\""
+ exit 1
+ else
+ echo "SHUTDOWNCMD=\"$SPECIALSHUTDOWN\""
+ exit 0
+ fi
+}
+
# calculate, at what time the machine should be powered on:
TIMER=$1
@@ -39,6 +52,11 @@
fi
fi
+if [ $MAX_TRY_AGAIN -gt 0 ] ; then
+ $LOG "nvram-wakeup: not setting time, because other hook postponed shutdown"
+ exit 0
+fi
+
# set wakeup time and check nvram-wakeup and check result:
$LOG "$NVRAMCMD -ls $TIMER $COMMANDLINE"
@@ -48,6 +66,12 @@
case $PIPESTATUS in
0) # all went ok - new date and time set
$LOG "nvram-wakeup: everything ok"
+
+ if [ $FORCE_REBOOT = "yes" ] ; then
+ $LOG "nvram-wakeup: reboot not needed but forced"
+ request_reboot
+ fi
+
exit 0
;;
1) # all went ok - new date and time set.
@@ -64,17 +88,10 @@
#
# For plan B - (don't forget to install the modified kernel image first)
#
-
- $LOG "nvram-wakeup: everything ok - need to reboot first"
-
- if [ -z "$SPECIALSHUTDOWN" ] ; then
- $LOG "nvram-wakeup: A special shutdown strategy is required but not configured."
- echo "ABORT_MESSAGE=\"no special shutdown configured\""
- exit 1
- else
- echo "SHUTDOWNCMD=\"$SPECIALSHUTDOWN\""
- exit 0
- fi
+
+ $LOG "nvram-wakeup: everything ok - need to reboot first"
+ request_reboot
+
;;
*) # something went wrong
# don't do anything - just exit with status 1
Index: vdr-nvram-wakeup.conf
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/nvram-wakeup/debian/vdr-nvram-wakeup.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- vdr-nvram-wakeup.conf 4 Jul 2004 17:02:05 -0000 1.1
+++ vdr-nvram-wakeup.conf 10 Nov 2004 23:53:15 -0000 1.2
@@ -28,6 +28,12 @@
#
SPECIALSHUTDOWN=""
+# To force a reboot whenever nvram-wakeup set the time, independently of
+# whether a reboot is required, enable this option.
+#
+# FORCE_REBOOT="yes"
+#
+
# If you want your VDR machine to wakeup in regular intervals (i.e. for
# updating EPG data), specify a day interval and a wakeup time:
#