summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-08-05 10:42:23 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-08-05 10:42:23 +0200
commit8bfe599830bad4528b4fa60dddaa3c0b8cb9c80d (patch)
tree6170b77550d2e3a4923fb6c57070c4c7242a8992 /vdr.c
parentc325fe76ee94f0335486269362d0404def27d8d1 (diff)
downloadvdr-8bfe599830bad4528b4fa60dddaa3c0b8cb9c80d.tar.gz
vdr-8bfe599830bad4528b4fa60dddaa3c0b8cb9c80d.tar.bz2
Modified the shutdown mechanism, so that the shutdown script is never given a time in the past
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vdr.c b/vdr.c
index 09ea29ef..2698d6bb 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.276 2006/06/18 08:49:20 kls Exp $
+ * $Id: vdr.c 1.277 2006/08/05 10:40:57 kls Exp $
*/
#include <getopt.h>
@@ -1166,6 +1166,12 @@ int main(int argc, char *argv[])
else
LastActivity = 1;
}
+ if (timer && Delta < Setup.MinEventTimeout * 60 && ForceShutdown) {
+ Delta = Setup.MinEventTimeout * 60;
+ Next = Now + Delta;
+ timer = NULL;
+ dsyslog("reboot at %s", *TimeToString(Next));
+ }
if (!Next || Delta > Setup.MinEventTimeout * 60 || ForceShutdown) {
ForceShutdown = false;
if (timer)