Hi Hans,
I had a look at your diff file. Would you mind to post also the following files:
/src/helpers/nextrecord.py
/src/plugins/shutdown.py
freevo_config.py
local_config.py
Thanks a lot.
I think a good solution would be an integration of your work and Georg's work.
My idea is to have
1) a idletimer plugin, which decides when it is time for shutdown.
2) a shutdown helper, who shedules the wakeup and shuts down the system
(this could also be called outside of freevo, instead of "halt" or
"shutdown")
3) an improved shutdown plugin, which warns if there are recordings in the near
future
and gives the possibilty to stop the automatic shutdown (idletimer)
4) your rebootflag.py for the possibly needed reboot
What do you think?
Tanja
[email protected] schrieb am 28.03.05 23:57:26:
>
> Hi everybody!
>
> On Wednesday 23 March 2005 13:27, Hans Meine wrote:
> > > what is the status of the nvram-wakeup integration for 1.5.x odr 2.0 ?
> > > I thought Hans Meine had allready published a patch but I can't find it.
> > > Is it available for download somewhere ?
>
> On private request from Georg, I am posting my patch again (not via PM, since
> it's of general interest I hope). It took me some time to have another look
> at the code and find out whether I changed anything else relevant to this
> problem in the meantime (unfortunately, my Freevo checkout shows a mixture of
> coding style-, spelling-, favorites-, and software suspend-related changes
> besides the shutdown/nvram-wakeup stuff). BTW: rebootflag.py should be put
> in src/helpers.
>
> What my patch does right now:
>
> * Warn before shutting down the system if the next recording is scheduled for
> starting in less than a configurable number of seconds (default
> "WARN_SHUTDOWN = 15 * 60" for a quarter hour) or if one is running.
> This has no extra effect if CONFIRM_SHUTDOWN is set, since then the shutdown
> is already confirmed.
>
> In any case, the shutdown confirmation dialog contains detailed information
> on
> a running/the next scheduled recording, and a shutdown is prevented in
> "harmful" cases. This alone is very useful for standalone boxes - is such a
> thing in Freevo 2.x already?
>
> * If USE_NVRAM_WAKEUP is set, Freevo uses nvram-wakeup to program the
> computer
> to wakeup / boot up right before the next recording. Normally, that's all
> you need to do. However, if required, you can change BOOTTIME_PADDING (150s
> by default) to configure how long before the recording the machine should
> start, or NVRAM_WAKEUP_CMD (default 'nvram-wakeup -s %d') e.g. if you need to
> use sudo.
>
> * An important obstacle to keep in mind is that nvram-wakeup cannot program
> all BIOSes completely, but often needs another reboot cycle. Supporting that
> situation (which happens to be the case with my motherboard of course ;-) )
> took my quite some additional thinking: In case a reboot is needed, my patch
> will turn the shutdown into a reboot, and creates a flag file which needs to
> be checked for during the boot-up procedure. If that file exists, it should
> be removed and the system should be shutdown. All that is done by the new
> "rebootflag" helper, just run "freevo rebootflag" in a (preferable early)
> init script (actually, if my patch is included in Freevo some day, that call
> should be included in the default freevo init script).
>
> "freevo rebootflag --help" will show you some additional options:
>
> freevo rebootflag [-c|-d|-s] [-v]
>
> -c only CHECK for the flag, exitcode 0 if present, 1 otherwise
> -d check for flag (as -c), and DELETE afterwards if it existed
> -s like -d but also SHUTDOWN the system if the flag existed (default)
> -v be verbose
>
> When using software suspend instead of shutdown (I have patches for that
> too),
> the mentioned reboot cycle stuff would turn into two consecutive suspends,
> where the first reboots instead of halts (that's at least possible with
> swsup2, which I am using).
>
> As mentioned, there are two main things that bug me:
>
> * When should nvram-wakeup be called? ATM, it's only called when the user
> shuts down the system via Freevo. Ideally, the programming should also
> happen if only Freevo is shut down (the system might be shutdown externally),
> of even if so. calls "halt" on that machine. I think the best place to call
> nvram-wakeup would be inside the recordserver - that would be the place
> anyhow when Freevo uses remote recording servers eventually. However, keep
> the ugly reboot-cycle stuff in mind.
>
> * The system is not yet shut down after recording. Instead of checking for
> user activity (which I planned to do first, in the style of a screensaver
> plugin), I am convinced that a better way would be what I proposed on the
> 23st of March: I have been thinking about a more general solution, where
> freevo modules could register running "jobs" centrally, and when you press
> shutdown, Freevo would display
>
> Shutdown: Waiting for the following jobs to finish:
> - recording "Foo Bar" on channel "Baz" (21min. to go)
> - ripping DVD "Blah" (ETA 5min.)
> - fetching TV guide
> [Cancel Shutdown]
>
> or similar (the display does not have to be that sophisticated at the
> beginning). Also, some kind of "sleep mode" could be integrated easily (for
> listening another 30min. to your favorite music, then auto-shutdown).
>
> Then, I would have to check for a Freevo startup within a short time window
> starting with the programmed nvram-wakeup time and automatically activate
> that shutdown screen.
>
> --
> Ciao, / /
> /--/
> / / ANS
>
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel