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

Joel Newcomb joelnewcomb at verizon.net
Mon Jan 7 01:15:00 UTC 2013


On 01/06/2013 03:30 PM, Thomas Boehm wrote:
> 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
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
Thanks for the response Thomas, I used the "sudo -c sh" as the command 
would not work as stated in Wiki. Using sudo gives me permission denied 
twice, once for each command echo to wakealarm. I have this added to my 
sudoer file:

%mythtv ALL = NOPASSWD: /sbin/shutdown, /usr/local/bin/setwakeup.sh, 
/sys/class/rtc/rtc0/wakealarm

Does the mythbackend mythbackend  in log entry above mean it is trying 
to execute as user mythbackend on host mythbackend?

BobW, I appreciate your comments, I can manually run my command using 
the error log UTC above and then checking /proc/driver/rtc, it is ready 
to restart. It seems to be how mythbackend writes that is the problem. 
What is the connection with mythshutdown? I thought that was just used 
with mythwelcome (which I do not need on my backend only machine). I 
will add it to my sudoer file, can't hurt. I am also on X64 machine, 
Asus M3N78-EM motherboard.

Joel





More information about the mythtv-users mailing list