<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 5, 2013 at 5:14 PM, Daryl McDonald <span dir="ltr"><<a href="mailto:darylangela@gmail.com" target="_blank">darylangela@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div class="h5">On Thu, Sep 5, 2013 at 3:03 PM, Bill Meek <span dir="ltr"><<a href="mailto:keemllib@gmail.com" target="_blank">keemllib@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On 09/05/2013 01:03 PM, Daryl McDonald wrote:<br>
...<br></div><div>
> I found this line (16220) E Scheduler scheduler.cpp:2820 (ShutdownServer) SetWakeuptimeCommand failed, shutdown aborted<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Is this an indication that there is a problem with my setwakeup script?<br>
</blockquote>
<br></div>
We can't tell from this line. But, you've collected the proper logs<br>
below...<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I did remove the checklogin.sh and the box still did not shut down.<br>
</blockquote>
<br></div>
OK, that's good. You've moved on to the next problem. For now, let's leave<br>
checklogin.sh removed. You'll have to address keeping up the system<br>
later. (solve one problem at a time)<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>
Another look at the BE log reveals:<br>
<br>
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:-<br></div><div>
sudo /usr/bin/setwakeup.sh 1378403399<br>
Sep 5 13:46:16 daryl-A780L3C mythbackend[4114]: E Scheduler scheduler.cpp:2820 (ShutdownServer) SetWakeuptimeCommand failed, shutdown aborted<br>
</div></blockquote>
<br>
New trick for you. Take the time in seconds above (1378403399) and plug them<br>
into the following:<br>
<br>
date --date='@1378403399'<br>
<br>
the result is: Thu Sep 5 12:49:59 CDT 2013 in my time zone, so you'll<br>
have to run the command in yours. But it suggests that there was a recording<br>
scheduled, perhaps at 13:00 AND that you've told mythbackend to wake-up 10<br>
minutes early.<br>
<br>
If you used the command: mythbackend --setverbose idle,system, there would<br>
have been more information in the log for when the command exited (remember<br>
the result code when checklogin.sh was failing?)<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
And in the backend UI the command is "sudo /usr/bin/setwakeup.sh $time" as<br>
per the Wiki. Does my setwakeup.sh need the suffix "$time"? Am I near or on<br>
the right track?<br>
</blockquote>
<br></div>
Yes, the command above is correct (without the quotes, which I'm sure you<br>
added for readability.)<br>
<br>
ls -l /usr/bin/setwakeup.sh does show that that command is executable of<br>
course!<br>
<br>
$time gets passed to the setwakeup.sh script as $1. So, yes, it's correct.<br>
<br>
If you manually run the date command in the above script:<br>
<br>
date -u --date "`date --date @1378403399 +%F" "%T`" +%s<br>
<br>
Guess what, it returns: 1378403399, the same value the backend passed<br>
to the script in the 1st place. No harm done. Personally, I don't understand<br>
why it's used. I'll let someone else comment on that.<br>
<br>
Let's run the setwakeup.sh command as the mythtv user (in order to test<br>
that the sudoers.d/mythtv file is doing it's job. Do this:<br>
<br>
sudo su mythtv<br>
sudo /usr/bin/setwakeup.sh 1390000000<br>
exit<br>
<br>
You *shouldn't* get prompted for a password. What is the result?<div><br>
<br>
-- <br>
Bill<br>
______________________________<u></u>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
</div><a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/<u></u>listinfo/mythtv-users</a></blockquote><div><br></div></div></div><div>Well,I think you've zoomed in on the problem with that chain of commands. I did get asked for the password however.</div>
<div><br></div><div>$ sudo /usr/bin/setwakeup.sh 1390000000</div><div>/usr/bin/setwakeup.sh: 17: /usr/bin/setwakeup.sh: : not found</div><div>/usr/bin/setwakeup.sh: 18: /usr/bin/setwakeup.sh: : not found</div><div>
/usr/bin/setwakeup.sh: 19: /usr/bin/setwakeup.sh: : not found</div>
<div>/usr/bin/setwakeup.sh: 22: /usr/bin/setwakeup.sh: cannot create /sys/class/rtc/rtc0/wakealarm : Directory nonexistent</div><div>/usr/bin/setwakeup.sh: 23: /usr/bin/setwakeup.sh: cannot create /sys/class/rtc/rtc0/wakealarm : Directory nonexistent</div>
<div>$ exit</div><div>daryl@daryl-A780L3C:~$ </div><span class=""><font color="#888888"><div><br></div><div>Daryl <br></div></font></span></div></div></div></blockquote><div>I can find it:</div><div><br></div><div> daryl@daryl-A780L3C:~$ cd /usr/bin</div>
<div>daryl@daryl-A780L3C:/usr/bin$ ls -al setwakeup.sh</div><div>-rwxr-xr-x 1 root root 634 Sep 1 18:29 setwakeup.sh</div><div>daryl@daryl-A780L3C:/usr/bin$ </div><div><br></div><div>And does the following indicate that I should have made a directory instead of a file, or that I should make a file a directory?</div>
<div><br></div><div><div>daryl@daryl-A780L3C:~$ cd /sys/class/rtc/rtc0/wakealarm</div><div>bash: cd: /sys/class/rtc/rtc0/wakealarm: Not a directory</div><div>daryl@daryl-A780L3C:~$ cd /sys/class/rtc/rtc0</div><div>daryl@daryl-A780L3C:/sys/class/rtc/rtc0$ ls -al wakealarm</div>
<div>-rw-r--r-- 1 root root 4096 Sep 5 09:05 wakealarm</div><div>daryl@daryl-A780L3C:/sys/class/rtc/rtc0$ </div></div><div><br></div><div>Daryl</div></div><br></div></div>