<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 5, 2013 at 11:01 AM, Bill Meek <span dir="ltr">&lt;<a href="mailto:keemllib@gmail.com" target="_blank">keemllib@gmail.com</a>&gt;</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 09:23 AM, Daryl McDonald 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">
The system did not shut down, here is the log level debug status:<br>
<br>
  daryl@daryl-A780L3C:~$ mythshutdown -v general --loglevel debug --status<br>
</blockquote></div>
...<div><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">
2013-09-05 10:11:22.482614 I  Mythshutdown: --status returned: 0<br>
daryl@daryl-A780L3C:~$<br>
</blockquote></div>
...<div><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 this backend log: &quot;<a href="http://paste.ubuntu.com/6066654/" target="_blank">http://paste.ubuntu.com/<u></u>6066654/</a>&quot;<br>
</blockquote>
<br></div>
On the bright side, you&#39;re using the proper tools to diagnose the<br>
problem. But you&#39;re not understanding their value. There was no<br>
need to pastebin the above log. You should have looked at the end<br>
especially line 16327. That explains the reason that shutdown didn&#39;t<br>
happen. Note that the most recent run of your backend starts at line<br>
16223. Posting From there until the end of the log allows folks<br>
trying to help you to get directly to the problem. Sorry, pet peeve<br>
of mine.<br>
<br>
Maybe you don&#39;t understand exit codes. In *this* case (and typically<br>
for shell scripts,) 0 = success and non zero = failure.<br>
<br>
Look at either of the checklogin.sh scripts. See what exit codes they<br>
return. Remember you can run them manually from the command line to see<br>
the result.<br>
<br>
As I mentioned yesterday, for testing purposes, you can just remove the<br>
checklogin.sh script from your MythTV setup and test idle shutdown again.<span><font color="#888888"><br>
<br>
-- <br>
Bill</font></span><div><div><br>
______________________________<u></u>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/" target="_blank">http://www.mythtv.org/mailman/</a><u></u>listinfo/mythtv-user</div></div></blockquote><div> </div>
</div>I found this line (16220)  E Scheduler scheduler.cpp:2820 (ShutdownServer) SetWakeuptimeCommand failed, shutdown aborted</div><div class="gmail_extra">Is this an indication that there is a problem with my setwakeup script?</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">I did remove the checklogin.sh and the box still did not shut down.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Another look at the BE log reveals:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">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 :-#012#011#011#011#011#011#011 sudo /usr/bin/setwakeup.sh 1378403399</div>
<div class="gmail_extra">Sep  5 13:46:16 daryl-A780L3C mythbackend[4114]: E Scheduler scheduler.cpp:2820 (ShutdownServer) SetWakeuptimeCommand failed, shutdown aborted</div><div class="gmail_extra">Sep  5 13:48:16 daryl-A780L3C mythbackend[4114]: I HouseKeeping housekeeper.cpp:225 (RunHouseKeeping) Running housekeeping thread</div>
<div class="gmail_extra">daryl@daryl-A780L3C:~$ </div><div class="gmail_extra"><br></div><div class="gmail_extra">And here is my setwakeup.sh:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">
#!/bin/sh</div><div class="gmail_extra">#</div><div class="gmail_extra"># set ACPI Wakeup time</div><div class="gmail_extra"># usage: setwakeup.sh seconds</div><div class="gmail_extra">#    seconds - number of seconds from epoch to UTC time (time_t time format)</div>
<div class="gmail_extra">#</div><div class="gmail_extra"># set UTCBIOS to true if bios is using UTC time</div><div class="gmail_extra"># set UTCBIOS to false if bios is using local time</div><div class="gmail_extra"><br></div>
<div class="gmail_extra">UTCBIOS=false</div><div class="gmail_extra"><br></div><div class="gmail_extra">if $UTCBIOS</div><div class="gmail_extra">then</div><div class="gmail_extra">    #utc bios - use supplied seconds</div>
<div class="gmail_extra">    SECS=$1</div><div class="gmail_extra">else</div><div class="gmail_extra">    #non utc bios - convert supplied seconds to seconds from</div><div class="gmail_extra">    #epoch to local time</div>
<div class="gmail_extra">    SECS=`date -u --date &quot;\`date --date @$1 +%F&quot; &quot;%T\`&quot; +%s`</div><div class="gmail_extra">fi</div><div class="gmail_extra"><br></div><div class="gmail_extra">echo 0 &gt; /sys/class/rtc/rtc0/wakealarm       # clear alarm</div>
<div class="gmail_extra">echo $SECS &gt; /sys/class/rtc/rtc0/wakealarm   # write the waketime</div><div class="gmail_extra"><br></div><div class="gmail_extra">And in the backend UI the command is &quot;sudo /usr/bin/setwakeup.sh $time&quot; as per the Wiki. Does my setwakeup.sh need the suffix &quot;$time&quot;? Am I near or on the right track?</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Daryl</div></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>