2014-08-26 23:33 GMT+04:00 Lennart Poettering <lenn...@poettering.net>: > Hmm? What's "possible" supposed to mean? I mean, certainly you can > invoke that syscall, and "systemctl reboot -ff" will do that for > you. But I'd really recommend not ever doing that, unless your system is > seriously stuck. > > In systemd, there are three ways to shut down the system: > > 1) The recommended way, by invoking PowerOff() on logind's manager > object. This will do polkit, respects inhibitors and > everything. Internally this then enqueues a start job for the > "poweroff.target" unit in PID 1, which the shuts down the system > cleanly, and terminates all services in order. THis is accessible via > "systemctl poweroff". > > 2) The more agressive way, by invokign PowerOff() on PID1's > manager interface. This tells systemd to immediately go in the final > killing spree, without bothering with polkit, inhibitors or correctly > terminating all services in the right order. This is not nice to > system services and user applications, but will still unmount all the > file systems, detach loopback/DM/... and so on. This is accessible > via "systemctl poweroff -f". Also by sending SIGRTMIN+14 to PID 1. > > 3) The super-agressive way, by invoking the reboot() syscall > directly. This doesn't bother with unmounting, or anything else, it > just resets the machine. THis is accessible via "systemctl poweroff > -ff" (which however, does a sync() before, but nothing else, the > filesystem will be marked dirty on next reboot, you will get fsck > started, still). > > Usually there's no reason to ever use anything but #1.
Very good doc, what about /sbin/shutdown as i see it is wraps systemctl shutdown, if i execute it with proper flags, for example like shutdown -h -P +0 ? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru jabber: v...@selfip.ru _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel