View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 4 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Jul 23, 2007 8:30 pm 
Offline
Joined: Sat May 26, 2007 9:51 pm
Posts: 130
After a few days of tinkering, I finally got my wake-on-lan to work.
I was only able to get it work by shutting down with '/etc/init.d/halt stop' which is basically the same as '/sbin/halt' with some added checks and flair. Using this halt, I was able to unset a network variable (NETDOWN) that allowed WoL.

Before this, I was using 'shutdown -h now' which provided a nice clean shutdown. However, for some reason WoL just didn't like this method of shutdown.

The biggest difference I see now is time to shut down. The halt script is almost instant while the shutdown command takes ~10 seconds. I assumed the extra time was spent terminating processes in an orderly fashion. (Does this seem right?)

If halt is better, I am going to stick with what I got. If shutdown is better, I will find a way to modify shutdown so that it uses /etc/init.d/halt rather than /sbin/halt since I believe shutdown uses the halt command correct?

So the main question: Does it matter which way the KnoppMyth box is shut down? Between the halt and shutdown commands described, is there any advantage of one over the other in any aspect? Or alternately, how do YOU shutdown? :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 23, 2007 9:36 pm 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
I use the 'Power Off' from the KnoppMyth menu.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 2:39 am 
Offline
Joined: Mon Jun 21, 2004 5:28 am
Posts: 700
Location: Germany
/etc/init.d/halt stop actually calls halt with the -f option. This by-passes the normal shutdown call and none of the shutdown scripts in /etc/init.d/rc0.d are called.

That is why your shutdown is happening faster now. To be honest, I do not know the risks of this. I wouldn't recommend it.

You might try removing the symbolic link /etc/rc0.d/S35networking. I suspect this is what is shutting down the network interface during shutdown. You should then be able to shutdown your system with "shutdown -h now" (or poweroff, or halt, or init 6, which all are pretty much the same thing).

Note: You will still need to leave the changes in /etc/init.d/halt that you made because this script is also called on shutdown.

To answer your question, I shutdown with mythwelcome (which I believe calls poweroff).

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 7:59 pm 
Offline
Joined: Sat May 26, 2007 9:51 pm
Posts: 130
Thanks for the GREAT advice alien!
Deleting /etc/rc0.d/S35networking symlink worked great. Now shutdown -h now works well and my wake-on-lan is still functional.

As it turns out, my rc0.d directory was filled with a lot of seemingly important shutdown scripts so it definately wasn't a good idea just to 'halt -f'...which probably explains why the hard disk had to check itself much more often on boot when using halt -f.

So now I can shut down remotely, automatically, or through the knoppmyth menu on mythfrontend. Although, I had to edit /usr/share/mythtv/knoppmyth.xml to change the poweroff command from 'halt' to 'shutdown -h now'

So all is great on this end. Thanks again!


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 82 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