LinHES Forums http://forums.linhes.org/ |
|
halt vs. shutdown: Which is more KnoppMyth-friendly? http://forums.linhes.org/viewtopic.php?f=5&t=15948 |
Page 1 of 1 |
Author: | tzoom84 [ Mon Jul 23, 2007 8:30 pm ] |
Post subject: | halt vs. shutdown: Which is more KnoppMyth-friendly? |
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? ![]() |
Author: | cecil [ Mon Jul 23, 2007 9:36 pm ] |
Post subject: | |
I use the 'Power Off' from the KnoppMyth menu. |
Author: | alien [ Tue Jul 24, 2007 2:39 am ] |
Post subject: | |
/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). |
Author: | tzoom84 [ Tue Jul 24, 2007 7:59 pm ] |
Post subject: | |
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! |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |