summaryrefslogtreecommitdiffstats
path: root/loader/shutdown.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove all the custom shutdown/reboot/halt code in loader and init.Chris Lumens2011-04-121-217/+0
| | | | | These decisions will now be made in anaconda proper. There's no need to involve three separate processes in the discussion.
* shutdown: kill processes in the anaconda process group.Ales Kozumplik2011-03-231-2/+20
| | | | | | | | Previously killall5 omitted the init's session (which includes the anaconda process group) and anaconda and everything spawned from there (including the vnc server) survived both the killall5 calls. Related: rhbz#679397
* shutdown.c: pidof and killall5 are in /sbin on rawhide.Ales Kozumplik2011-03-231-3/+3
| | | | | Without this the termination procedure just prints errors about how it can not find the binaries.
* Fix another unused return value error message.Chris Lumens2011-03-011-3/+2
|
* Perform terminations before unmounting filesystems on shutdown.David Lehman2011-02-221-12/+39
| | | | | | | | | | | | | | We switched to doing umounts beforehand and also to using lazy umount to prevent hangs due to having killed NetworkManager prior to unmounting NFS media. (commit a1c759a9524e003) With this we perform terminations first, but we use killall5's ability to omit certain pids from the list of processes to kill. We kill everything except mdmon (this bug), NetworkManager, and dhclient (for the NFS unmount thing, bz#463959). We don't need to do lazy unmounting anymore, either. Resolves: rhbz#604614
* shutdown: Use lstat to test for /lib64Hans de Goede2010-08-021-1/+1
| | | | | | | | | When deciding if we need to mv /lib64_old to /lib64 or /lib_old to /lib after unmounting /mnt/runtime, lstat must be used as /lib64 if present is a link to a no longer existing dir, so using regular stat to test for /lib64 will fail as regular stat follows links. Related: rhbz#604614
* Ignore errors upon restoring /lib and /usr after unmounting filesystemsHans de Goede2010-06-011-14/+14
| | | | | | | | | Ignore errors upon restoring /lib and /usr after unmounting filesystems, otherwise these errors always get reported when rebooting before we've reached stage2. Instead add proper error checking to the execution of mdadm. Related: rhbz#598222
* Make sure we still have an elf interpreter after unmounting fs (#598222)Hans de Goede2010-05-311-0/+20
| | | | | | | | | | | When moving to stage2 we rename the initrd /lib to /lib_old and add a symlink from /lib to /mnt/runtime/lib. When shutting down we unmount filesystems and then after unmount try to run mdadm to wait for any Intel BIOS RAID arrays to have their metadata updated that they were cleanly shutdown to avoid a resync of the entire array on the next boot. But at this point /lib is a dangling symlink, so no elf interpreter gets found (nor libc) and the mdadm call we do fails, leaving the array unclean.
* Improve reboot modes in init.c and shutdown.c.Ales Kozumplik2010-02-101-21/+42
| | | | | | | | Stop the kernel correctly on HALT (so that we dont see 'kernel panic, they killed init' on i386 and on s390 one gets easy access to manual IPL). Introduce a new reboot method that does allow us to see the backtrace and doesn't scroll the screen up with useless unmount info.
* Fix compile problem from 65a3c05.Ales Kozumplik2010-01-201-2/+2
|
* Handle reboot better on s390 (#533198)David Cantrell2010-01-191-31/+8
| | | | | | | | Do not install a handler for SIGINT on s390 since you can't really press Ctrl+Alt+Del there. Only handle SIGUSR1 and SIGUSR2 as handled in linuxrc.s390 (which comes from loader which comes from iutil.py). Always make sure we unmount filesystems and kill off processes, then reboot if that's requested or exit and display the halt message.
* Remove test mode from the loader, too.Chris Lumens2009-12-031-8/+2
| | | | | All previous comments about test mode being untested apply to loader, but doubly so.
* Adapt standalone shutdown to nokill changes so s390x can use it. (#528380)Steffen Maier2009-10-151-3/+8
| | | | | | | | | The support for boot option "nokill" in shutdown by ade8105a8515afee24220fd0cc1199e30c1c3142 did not adapt the standalone version of shutdown (#ifdef AS_SHUTDOWN) so doKill was always 0. Introduce a new command line option "--nokill" and otherwise default to doKill=1. While we're at it also provide a command line option "-P" for poweroff.
* Wait for mdraid arrays to become clean before reboot / haltHans de Goede2009-09-301-0/+5
| | | | | | | With the new external metadata mdraid support we need to wait for raid sets to become clean (iow for mdmon to have finished updating the metadata) before rebooting. Otherwise we get a full array sync on the first boot after installation.
* Fix an erroneous "!" in the test for doKill, and make reboot explicit.Peter Jones2009-08-121-1/+1
| | | | | | This test causes it not to reboot if you don't specify anything about rebooting in kickstart or on the command line. It also treats /all/ installs with "nokill" specified as "halt" installs.
* Call shutDown() correctly for s390Karsten Hopp2009-08-061-1/+1
| | | | | Syntax of shutDown() function changed recently, so make sure we call it correctly.
* Fix ctrl-alt-deleter behavior /before/ end of install.Peter Jones2009-08-041-3/+5
| | | | | | The new reboot code didn't take into account the fact that there's a different sigint handler while anaconda is running vs when we're done installing. This patch fixes that bad assumption.
* Rework shutDown() to better accomidate "nokill" better.Peter Jones2009-07-301-31/+56
| | | | | | Rework shutDown() so that we don't do unmounts until we're going to reboot or power off the machine. Also some minor cleanups like taking out all the negative-phrasing of "noKill" in the code itself.
* Lazily unmount everything before killing NetworkManager (#463959).Chris Lumens2008-10-071-6/+6
| | | | | | | This fixes a problem where we'd kill NM, then try to unmount our NFS installation source. The result was a hang on the unmount and anaconda never rebooting. Instead, unmount before killing processes and do the unmounts lazily since /mnt/stage2 is likely to still be busy.
* Renamed loader2 subdirectory to loader (hooray for git)David Cantrell2008-08-251-0/+124