Bug#854648: systemd-sysv: Immediate shutdown can happen despite future time argument if unable to talk to shutdownd

Will Aoki waoki at umnh.utah.edu
Wed Feb 8 23:09:22 GMT 2017


Package: systemd
Version: 215-17+deb8u6
Severity: minor

After upgrading a system from wheezy to jessie, I attempted to schedule a
reboot at 8:27 AM by executing '/sbin/shutdown -r 08:27 completing upgrade'.
It produced this (partial) error, which did not stay on the screen long enough
to copy:

   Failed to talk to shutdownd, proceeding with immediate shutdown:

and rebooted immediately.

Rebooting immediately when the user has specified a time in the future is
unexpected and undocumented behavior.

I have not tested this patch, but the gist of the fix is:

--- src/systemctl/systemctl.c	2017-02-08 15:45:39.000000000 -0700
+++ src/systemctl/systemctl.c.orig	2017-02-08 16:04:21.503618530 -0700
@@ -6897,7 +6897,8 @@
                                    m);
 
                 if (r < 0)
-                        log_warning("Failed to talk to shutdownd, proceeding with immediate shutdown: %s", strerror(-r));
+                        log_warning("Failed to talk to shutdownd, not scheduling shutdown: %s", strerror(-r));
+			return -1;
                 else {
                         char date[FORMAT_TIMESTAMP_MAX];
 


It could instead be fixed by updating the manpage, but not rebooting
immediately follows the principle of least surprise.



More information about the Pkg-systemd-maintainers mailing list