[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

systemd ignores / overrides 'shutdown -t' delay?



David Wright:

I think the arguments have changed/been juggled/reduced. The lack of -F is especially annoying.


They haven't been. All of the documented options to upstart's shutdown command and the System 5 rc shutdown command are recognized, albeit that four of them, including -F, are then simply ignored. What has in fact happened is twofold:

* The systemd people decided a few years ago that flag files are a bad way to signal fsck at bootstrap, given that if a filesystem is dirty and potentially corrupt one probably doesn't want to go around writing flag files to it. So the kernel command line is used for that. It's rather harder for the shutdown command to rewrite the kernel command line for the next reboot than it was to create empty flag files. (Given the inclusion of a kernel loader in systemd, it's not beyond the bounds of possibility for the systemd shutdown command to grow an internal interface to the systemd kernel loader that permits it to write "at next boot" action settings, of course. But none exists yet.) So the -f and -F options do nothing. * Single-user mode has become "rescue mode", and it's no longer a state reachable by shutdown in systemd operating systems like Debian. It's a startup state, not a shutdown one. The default for the shutdown command used to be that without any options it would place the system in single-user mode mode. The -h option would explicitly tell it to power off or halt instead, with the -H or -P options specifying which one, the choice in their absence being up to the system. Since single-user mode is no longer a shutdown option, -h is effectively on by default, defaulting to halt.

* https://bugzilla.redhat.com/show_bug.cgi?id=806369#c13
* https://bugzilla.redhat.com/show_bug.cgi?id=733874#c2
* http://unix.stackexchange.com/a/196471/5132
* http://unix.stackexchange.com/a/196014/5132


Reply to: