Bugs item #1612257, was opened at 2006-12-09 18:30
Message generated for change (Comment added) made by mennucc
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1612257&group_id=46652

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: plugins
Group: 1.6.1
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: A C G Mennucc (mennucc)
Assigned to: Nobody/Anonymous (nobody)
Summary: many autoshutdown issues

Initial Comment:
hi

I just upgraded from freevo 1.5.4 to 1.6.1; in 1.5.4 I had installed the 
wakeupshutdown plugin, and I see that now the autoshutdown plugin is supposed 
to do the same; but I found some bugs; I propose a patch; here is a description.

The variables 
WARN_SHUTDOWN 
BOOTTIME_PADDING
USE_NVRAM_WAKEUP 
NVRAM_WAKEUP_CMD 
NVRAM_REBOOT_FLAG
are contained in freevo_config.py but not used anywhere

'nvram-wakeup' already defaults to a 5 minutes boottime padding; I added '-w 0' 
to the command

The nvram-wakeup command has a return code of 1 when the computer needs to be 
rebooted; this is now ignored; I (re)implemented it and changed the semantic of 
AUTOSHUTDOWN_BIOS_NEEDS_REBOOT.

I also add a feature:
# WHILE_LOGGED
# The system may automatically shutdown even if someone
# is logged in  (as reported by 'who' )
AUTOSHUTDOWN_WHILE_USER_LOGGED=True
(I hate when freevo shuts down while I am doing remote mantainance)

And I added 'mencoder' to the programs that will pause automatic shutdown.

btw: the path in Debian is /usr/sbin/nvram-wakeup

a.

ps: there are other improvements needed; basically, autoshutdown should have a 
kind of 'fallback', for when nvram-wakeup fails, or when blackout occours, etc 
etc

----------------------------------------------------------------------

>Comment By: A C G Mennucc (mennucc)
Date: 2006-12-09 22:40

Message:
Logged In: YES 
user_id=79281
Originator: YES

correction to the patch
File Added: freevo-1.6.1-autoshutdown.diff

----------------------------------------------------------------------

Comment By: A C G Mennucc (mennucc)
Date: 2006-12-09 22:15

Message:
Logged In: YES 
user_id=79281
Originator: YES

sorry I had noted that mistake ( = instead of == ) ; but also I found out
that my Freevo box is not waking up  when it should ... so I have been
debugging this for 3 hours now; as soon as I fix this as well, I will post
an updated patch; I will also set AUTOSHUTDOWN_BIOS_NEEDS_REBOOT to
required,
not_required and dont_know.

----------------------------------------------------------------------

Comment By: Duncan Webb (duncanwebb)
Date: 2006-12-09 22:09

Message:
Logged In: YES 
user_id=104395
Originator: NO

The variable WARN_SHUTDOWN, etc are a bit of history, I'll get grid of
these, thanks.

mencoder, should be in the list of pausing programs.

nvram_wakeup does not have a -w option in all builds, this may be a debian
extension at the five minutes is hardcoded in one of the header files.

The idea of someone being logging is pausing shutdown is a really good
one, but I have a question what are four bytes that are return when nobody
is logging?

I don't like the implementation of AUTOSHUTDOWN_BIOS_NEEDS_REBOOT=auto,
True, False and auto don't really go together, better with required,
not_required and dont_know. What do you think?

+            ec = __syscall(cmd)
+            if  config.AUTOSHUTDOWN_BIOS_NEEDS_REBOOT != False and \
+                    (ec == 256 or config.AUTOSHUTDOWN_BIOS_NEEDS_REBOOT =
True):
the last line should be:
+                    (ec == 256 or config.AUTOSHUTDOWN_BIOS_NEEDS_REBOOT
== True):

IIRC nvram_wakeup can return 1 if it needs a reboot, this can be set up in
the nvram_wakeup config file.

Many thanks



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1612257&group_id=46652

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to