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

BobW bob_pub_mailbox-mytv at yahoo.com
Mon Jan 7 03:57:48 UTC 2013


On 1/6/2013 8:43 PM, Joel Newcomb wrote:
> On 01/06/2013 05:15 PM, Joel Newcomb wrote:
>> 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
>>
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>
> Thomas & Bob, thanks for your help, my backend is shutting down by 
> itself now. I removed the "sudo sh -c" and only have the sudo in front 
> of my /usr/local/bin/setwakeup, just as Wiki states. I also added the 
> /usr/bin/mythshutdown to my sudoer file. I just do not understand the 
> connection to mythshutdown, but I am happy it is working.

Frankly I don't understand why it started working when I put 
mythshutdown into sudoers either. (Or why it worked for weeks prior to 
that if it was previously required!)

I also am not real clear on why/what/how/which process is initiating the 
shutdown. -- Like why didn't my backend shutdown last night?

Glad to see that something at least worked and you got it functioning 
properly.

Bob W


More information about the mythtv-users mailing list