View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Feb 15, 2010 7:00 pm 
Offline
Joined: Sun Sep 04, 2005 7:48 pm
Posts: 264
Location: Perth, Australia
Hi All,

I'm using mythwelcome to auto-turn-on for recording, rather than leaving the box on 100%

My question is that when i perform a backup (from the LinHES menus), the pc shuts down after a period of time.

My guess is that mythbackup stops the mythbackend (to perform the backup), and mythwelcome thinks that since the backend is down, that its time to turn off.

If this is true, what facility do we have to do something like
1) "lock" the shutdown in mythwelcome
2) do the mythbackup
3) "unlock" the shutdown in mythwelcome

Has anyone else experienced this? Thoughts appreciated.

Cheers,

Nathan

_________________
LinHES: R6 | MB: Asus M3N-H/HDMI | CPU: AMD ??Mhz
Capture: 2xHDHR DVB-T
Graphics: Onboard 8300|PSU: Corsair vx450w
Cooling: Zalman cu?,
Display: Benq xx projector


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 15, 2010 7:55 pm 
Offline
Joined: Mon Aug 14, 2006 8:24 pm
Posts: 320
Location: Melbourne, Australia
Yes mine does the same thing and I am never sure whether it has shutdown correctly and will wake when required. So I always restart and then shutdown via Mythwelcome to make sure. Preventing the shutdown would be good.

Note I am still using R5.5.

_________________
Intel DG965WH, Dvico DVB-T Lite x2, HDHR, Gigabyte GT220, KingstonSSD, WD20EARS version=latest


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 15, 2010 10:19 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The current versions of the backup script (which includes the one in R5.5) do:
Code:
/usr/bin/mythshutdown --lock

before starting the real work to prevent the auto-shutdown and then
Code:
/usr/bin/mythshutdown --unlock

afterward to enable normal operations. This posting in the "Taking advantage of the enhanced backup and restore scripts" thread covers some reasons that you might still have problems:
http://knoppmyth.net/phpBB2/viewtopic.php?p=112490#112490 Generally auto-restart or watchdog scripts are the biggest source of problems.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 15, 2010 10:55 pm 
Offline
Joined: Sun Sep 04, 2005 7:48 pm
Posts: 264
Location: Perth, Australia
Hmmm, interesting... on my KM box the only non-standard regular script that gets run be cron is a mythfilldatabase (shepherd)... might need to look into the logs to see what is shutting down... it must be mythwelcome doing the shutdown, but i wonder why it is failing to abort shutdown when it does the mythshutdown --check.... i'll have a poke around tonight.

Cheers,

Nathan

_________________
LinHES: R6 | MB: Asus M3N-H/HDMI | CPU: AMD ??Mhz
Capture: 2xHDHR DVB-T
Graphics: Onboard 8300|PSU: Corsair vx450w
Cooling: Zalman cu?,
Display: Benq xx projector


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 16, 2010 2:25 am 
Offline
Joined: Mon Jun 21, 2004 5:28 am
Posts: 700
Location: Germany
Yes, I had problems where the frontend would not connect to the backend after the backup and it would shutdown since there was no frontend.

locking/unlocking won't completely fix the problem. After you unlock, it will shutdown if the frontend isn't connected. You have to restart the frontend as well.

I avoided all this by creating a daily wakeup period in mythwelcome and then running a cron script in that period. The backup portions of my script look like:
Code:
#!/usr/bin/perl

# Make sure we aren't recording....
while (($status=system("/usr/bin/mythshutdown -s")/256) != 64) {
        sleep(20);
}

# Just in case waiting for a recording pushed us out of the wakeup period
system("/usr/bin/mythshutdown -l");

$error=system("/usr/LH/bin/mythbackup > /tmp/mythbackup.out 2>&1");
if($error) {
        system("cat /tmp/mythbackup.out | /usr/bin/mail -s mythbackup mythtv");
}
system("/usr/bin/mythshutdown -u");
Note: I don't need to restart the frontend because this is a daily wakeup period.

_________________
ASUS AT3N7A-I (Atom 330)
TBS 8922 PCI (DVB-S2)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 16, 2010 6:27 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Unfortunately restarting the FE from within mythbackup doesn't play well with the fact that it's often run from there. Using a simple wrapper script is probably the best answer.

I've helped folks with these in the past, and even put together the idle.sh script for that purpose. Searching the forums for "idle.sh" should turn up the threads pretty quickly.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu