[mythtv-users] ACPI and setwakeup.sh Mythbuntu 12.04 w/.25 fixes

Thomas Boehm mythtv-users at lists.boehmi.net
Sun Jan 6 23:30:17 UTC 2013


Joel Newcomb wrote:
> Hello MythTV community, I am having difficultly making my backend only
> machine set it's wakeup time. What worked flawlessly in Mythbuntu 10.04
> does not seem to react the same as my new 12.04 with .25 fixes. When
> using the manual test from Myth.org/wiki/ACPI_wakeup,(w/ same scripts,
> permissions, hwclock settings) all works as expect, machine powers
> itself back up. If I log out and let the checklogin.sh script run, I see
> errors in mythbackend.log:
> 
> Jan  6 12:09:38 mythbackend mythbackend[1852]: I Scheduler
> scheduler.cpp:2728 (CheckShutdownServer) CheckShutdownServer returned -
> OK to shutdown
> Jan  6 12:09:38 mythbackend mythbackend[1852]: N Scheduler
> scheduler.cpp:2813 (ShutdownServer) Running the command to set the next
> scheduled wakeup time :-#012#011#011#011#011#011#011sudo sh -c
> "/usr/local/bin/setwakeup.sh 1357519800"
> Jan  6 12:09:38 mythbackend mythbackend[1852]: E Scheduler
> scheduler.cpp:2819 (ShutdownServer) SetWakeuptimeCommand failed,
> shutdown aborted


The wiki says:

"Command to set Wakeup Time: sudo /usr/bin/setwakeup.sh $time"

but you seem to use "sudo sh -c /usr/local/bin/setwakeup.sh $time"

In this case you need to add and entry in your sudoers file for the
command "sh" instead of "/usr/local/bin/setwakeup.sh".

I wouldn't recommend this though, since all members of the group mythtv
could then run any command using "sudo -c sh ...", even "sudo -c sh rm
-rf /"

So follow the wiki and use "sudo /usr/local/bin/setwakeup.sh $time" (if
your script is in /usr/local/bin/) or "mythshutdown --setwakeup $time"
like I do.

HTH
Thomas


More information about the mythtv-users mailing list