Commit Graph

18 Commits

Author SHA1 Message Date
Michal Schmidt 2569a5ce16 shutdown: downgrade a warning
All messages of the kind "not all done, %d left" are log_info, except
the one for DM devices. Make it info too.
2012-12-07 17:28:30 +01:00
Tom Gundersen 02eaa78835 shutdown: don't pivot to /run/initramfs if already there
This allows systemd-shutdown to be installed as /run/initramfs/shutdown
and take care of the proper teardown of the rootfs.
2012-11-28 18:26:35 +01:00
Lennart Poettering 0049f05a8b shutdown: readd explicit sync() when shutting down
As it turns out reboot() doesn't actually imply a file system sync, but
only a disk sync. Accordingly, readd explicit sync() invocations
immediately before we invoke reboot().

This is much less dramatic than it might sounds as we umount all
disks/read-only remount them anyway before going down.
2012-11-16 01:35:11 +01:00
Lennart Poettering cb7ec5645e shutdown: in containers, invoke reboot(2), too. Then fallback to exit() if CAP_SYS_BOOT is missing
The kernel's PID namespaces support reboot(2) just fine, so let's make
use of it if possible.
2012-09-05 15:55:40 -07:00
Lennart Poettering 57371e5829 shutdown: remove explicit sync() invocations
The kernel implicitly does sync() anyway, hence there is no need to do
that in userspace explicitly. This makes the "-n" switch to halt(8) a
noop.
2012-09-05 15:32:57 -07:00
Lennart Poettering f47fc35555 switch-root: remount to MS_PRIVATE
The kernel does not allow switching roots if things are mounted
MS_SHARED. As a work-around, remount things MS_PRIVATE before switching
roots.

This should be fixed in the kernel for good.

https://bugzilla.redhat.com/show_bug.cgi?id=847418
2012-08-12 01:31:03 +02:00
Dave Reisner 4bfa638d43 shutdown: recursively mark root as private before pivot
Because root is now recursively marked as shared on bootup, we need to
recursively mark root as private. This prevents a pivot_root failure on
shutdown:

  Cannot finalize remaining file systems and devices, giving up.
  pivot failed: Invalid argument
2012-08-10 17:59:33 +02:00
Lennart Poettering cee530bb23 switch-root: don't wait for processes
When we transition from the initrd to the main system, don't reap
processes, so that they can be handled normally after deserialization.
2012-07-17 17:44:26 +02:00
Ville Skyttä 49f43d5f91 Spelling fixes. 2012-07-16 12:16:29 +02:00
Lennart Poettering 39d6464ce3 shutdown: add missing include 2012-07-13 21:54:28 +02:00
Lennart Poettering 910212e738 container: when shutting down in a container don't detach loop devices
We don't do device handling in containers, hence no loop devices either.
2012-07-13 14:42:25 +02:00
Lennart Poettering bd3fa1d243 core: go on a killing spree when transitioning from initrd to main system 2012-07-13 14:41:57 +02:00
Lennart Poettering cd3bd60a2e switch-root: reopen /dev/console before we switch root 2012-07-10 19:19:59 +02:00
Kay Sievers d2e54fae5c mkdir: append _label to all mkdir() calls that explicitly set the selinux context 2012-05-31 12:40:20 +02:00
Lennart Poettering 6edd7d0a09 sleep: implement suspend/hibernate as first class targets 2012-05-08 13:54:23 +02:00
Lennart Poettering b55d0651c0 shutdown: don't complain if we cannot lock memory, to make container shutdowns clean 2012-04-24 16:56:06 +02:00
Lennart Poettering ff64462375 shutdown: don't try to shut down DM devices in a container 2012-04-22 15:50:52 +02:00
Lennart Poettering 146de8175e shutdown: move shutdown to core since it replaces PID 1 2012-04-12 14:18:36 +02:00
Renamed from src/shutdown.c (Browse further)