Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Power off with 1.1.19?
Gregoire Favre wrote:
>
> Hello,
>
> I still use the same scrips to manage VDR, and when I try to power off
> my computer with VDR, all I see is a message in the syslog:
>
> Dec 8 23:27:29 localhost vdr[2230]: Power button pressed
>
> I use this:
>
> vdr-1.1 -v /video0 -P tetris -P teletext -P status -P dvd -s /usr/local/bin/HALT
>
> And in /usr/local/bin/HALT:
>
> #!/bin/sh
> #setRTCwakeup $(($1 - 300))
> sudo halt -p
>
> Sorry if I have done something really stupid, I'll enjoy to be able to
> poweroff my computer with VDR again ;-)
Please try the following changes to the original vdr.c from version 1.1.19:
--- vdr.c 2002/12/13 13:37:28 1.138
+++ vdr.c 2002/12/13 14:24:54
@@ -424,6 +424,7 @@
time_t LastActivity = 0;
int MaxLatencyTime = 0;
bool ForceShutdown = false;
+ bool UserShutdown = false;
if (WatchdogTimeout > 0) {
dsyslog("setting watchdog timer to %d seconds", WatchdogTimeout);
@@ -539,6 +540,7 @@
ForceShutdown = true;
}
LastActivity = 1; // not 0, see below!
+ UserShutdown = true;
break;
default: break;
}
@@ -665,7 +667,6 @@
else
LastActivity = 1;
}
- bool UserShutdown = key == kPower;
if (UserShutdown && Next && Delta <= Setup.MinEventTimeout * 60 && !ForceShutdown) {
char *buf;
asprintf(&buf, tr("Recording in %d minutes, shut down anyway?"), Delta / 60);
@@ -694,6 +695,7 @@
signal(SIGALRM, SIG_IGN);
}
LastActivity = time(NULL); // don't try again too soon
+ UserShutdown = false;
continue; // skip the rest of the housekeeping for now
}
}
The line numbers may be slightly off because in the meantime I have done some
other changes, too. However, it should be rather easy to apply these modifications.
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index