From: William S. <wst...@po...> - 2002-10-10 21:18:18
|
Good day, Nuno, On Thu, 10 Oct 2002, Nuno Silva wrote: > Jeff Dike wrote: > > > >>- send SIGHUP to linux's PID to iniciate a reboot; > >>- send SIGTERM to initiate a halt; > >>- send SIGALRM to sync linux-uml's disk buffers; > >>- send SIGKILL to make a (sort of) power-down <- this already works :) > > > > > > I'm not thrilled with this sort of thing. That's available from mconsole > > and that's a nicer interface. > > > > As far as I'm concerned, the signal stuff is for last-ditch halting when > > nothing else works. As someone that asked Jeff for exactly the same thing a few years back, I agre with him now that mconsole is the right thing. > OK, but it would be easier to script start/stop UML's with SIGTERM... > > Using mconsole requires lots of scripting to do something that a simple > kill -TERM `cat /home/user26/uml/uml.pid` would do ;) If you find the following harder: uml_mconsole "/home/user26/.uml/user26-id/mconsole" sysrq s uml_mconsole "/home/user26/.uml/user26-id/mconsole" sysrq u uml_mconsole "/home/user26/.uml/user26-id/mconsole" sysrq b how about uml_go user26 stop which does the above for you. http://www.stearns.org/slartibartfast/ , may need some customization for your environment. > Comparing with another "service", mysqld: > > I dare to say that this is expected behaviour. When you "killall mysqld" > you don't expect to get a corrupted DB. That's why we have SysV scripts, so you type "/etc/rc.d/init.d/mysqld stop" and assume the script knows how to shut down cleanly better than you. > Anyway, I agree that mconsole is the "mysqladmin shutdown", i.e. the > right way of doing it (C). :) Cool. Cheers, - Bill --------------------------------------------------------------------------- "Those that would give up a necessary freedom for temporary safety deserve neither freedom nor safety." -- Ben Franklin (Courtesy of Jim Potter <jr...@wv...>) -------------------------------------------------------------------------- William Stearns (wst...@po...). Mason, Buildkernel, named2hosts, and ipfwadm2ipchains are at: http://www.stearns.org -------------------------------------------------------------------------- |