[mythtv-users] Carbon Footprint

Daryl McDonald darylangela at gmail.com
Thu Sep 5 21:14:12 UTC 2013


On Thu, Sep 5, 2013 at 3:03 PM, Bill Meek <keemllib at gmail.com> wrote:

> On 09/05/2013 01:03 PM, Daryl McDonald wrote:
> ...
> > I found this line (16220)  E Scheduler scheduler.cpp:2820
> (ShutdownServer) SetWakeuptimeCommand failed, shutdown aborted
>
>> Is this an indication that there is a problem with my setwakeup script?
>>
>
> We can't tell from this line. But, you've collected the proper logs
> below...
>
>
>  I did remove the checklogin.sh and the box still did not shut down.
>>
>
> OK, that's good. You've moved on to the next problem. For now, let's leave
> checklogin.sh removed. You'll have to address keeping up the system
> later. (solve one problem at a time)
>
>  Another look at the BE log reveals:
>>
>> Sep  5 13:46:15 daryl-A780L3C mythbackend[4114]: N Scheduler
>> scheduler.cpp:2814 (ShutdownServer) Running the command to set the next
>> scheduled wakeup time:-
>>         sudo /usr/bin/setwakeup.sh 1378403399
>> Sep  5 13:46:16 daryl-A780L3C mythbackend[4114]: E Scheduler
>> scheduler.cpp:2820 (ShutdownServer) SetWakeuptimeCommand failed, shutdown
>> aborted
>>
>
> New trick for you. Take the time in seconds above (1378403399) and plug
> them
> into the following:
>
>     date --date='@1378403399'
>
> the result is: Thu Sep  5 12:49:59 CDT 2013 in my time zone, so you'll
> have to run the command in yours. But it suggests that there was a
> recording
> scheduled, perhaps at 13:00 AND that you've told mythbackend to wake-up 10
> minutes early.
>
> If you used the command: mythbackend --setverbose idle,system, there would
> have been more information in the log for when the command exited (remember
> the result code when checklogin.sh was failing?)
>
>
>  And in the backend UI the command is "sudo /usr/bin/setwakeup.sh $time" as
>> per the Wiki. Does my setwakeup.sh need the suffix "$time"? Am I near or
>> on
>> the right track?
>>
>
> Yes, the command above is correct (without the quotes, which I'm sure you
> added for readability.)
>
> ls -l /usr/bin/setwakeup.sh does show that that command is executable of
> course!
>
> $time gets passed to the setwakeup.sh script as $1. So, yes, it's correct.
>
> If you manually run the date command in the above script:
>
>     date -u --date "`date --date @1378403399 +%F" "%T`" +%s
>
> Guess what, it returns: 1378403399, the same value the backend passed
> to the script in the 1st place. No harm done. Personally, I don't
> understand
> why it's used. I'll let someone else comment on that.
>
> Let's run the setwakeup.sh command as the mythtv user (in order to test
> that the sudoers.d/mythtv file is doing it's job. Do this:
>
>     sudo su mythtv
>     sudo /usr/bin/setwakeup.sh 1390000000
>     exit
>
> You *shouldn't* get prompted for a password. What is the result?
>
>
> --
> Bill
> ______________________________**_________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/**listinfo/mythtv-users<http://www.mythtv.org/mailman/listinfo/mythtv-users>


Well,I think you've zoomed in on the problem with that chain of commands. I
did get asked for the password however.

$ sudo /usr/bin/setwakeup.sh 1390000000
/usr/bin/setwakeup.sh: 17: /usr/bin/setwakeup.sh:    : not found
/usr/bin/setwakeup.sh: 18: /usr/bin/setwakeup.sh:    : not found
/usr/bin/setwakeup.sh: 19: /usr/bin/setwakeup.sh:    : not found
/usr/bin/setwakeup.sh: 22: /usr/bin/setwakeup.sh: cannot create
/sys/class/rtc/rtc0/wakealarm      : Directory nonexistent
/usr/bin/setwakeup.sh: 23: /usr/bin/setwakeup.sh: cannot create
/sys/class/rtc/rtc0/wakealarm  : Directory nonexistent
$ exit
daryl at daryl-A780L3C:~$

Daryl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130905/0313494e/attachment.html>


More information about the mythtv-users mailing list