Commit graph

5 commits

Author SHA1 Message Date
Lennart Poettering e61cd18666 shutdown: make use of wait_for_terminate_and_warn() 2010-10-14 00:50:11 +02:00
Lennart Poettering d37fb98bbc shutdown: execute rescue kill only once 2010-10-14 00:49:53 +02:00
Lennart Poettering 567ea02a89 shutdown: don't chdir to /, since init is running with / as cwd anyway 2010-10-14 00:49:22 +02:00
Lennart Poettering 3c14d26c47 util: unify implementations of freeze() 2010-10-07 19:34:56 +02:00
Fabiano Fidencio b1b2a107d1 shutdown: Adding binary to shutdown the system
This functions are working as follows:
   - Send a SIGTERM to all processes that may be finished
   - Send a SIGKILL to all processes that still live and may be finished
   - Try to unmount all mount points
   - Try to remount read-only all mount points that can't be umounted
   - Umount all swap devices
   - Umount and detach all loopback devices
   - Call [poweroff|halt|reboot|kexec]

TODO:
   - Umount device-mapper.
   - Make log work. So far it is being useless as we do not parse
     /etc/systemd/system.conf, kernel command line but just
     environment, however we're executed by init and thus have no
     useful variables. Forcing it to target=kmsg/console and
     level=debug also does not produce any output, however writing to
     /dev/console does work (hack used during debug).
2010-10-07 19:23:46 +02:00