[systemd-commits] src/login

Daniel Mack zonque at kemper.freedesktop.org
Wed May 27 04:45:38 PDT 2015


 src/login/logind-dbus.c |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit fb91034cf5907bbbabba1e8821b01f3b37aa56d5
Author: Daniel Mack <daniel at zonque.org>
Date:   Tue May 26 18:56:40 2015 +0200

    logind: unlink /run/nologin when shutdown is cancelled
    
    When a scheduled is cancelled, make sure to remove /run/nologin.
    This is a regression from the recent shutdownd removal and logind rework.

diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 1f5cf86..3555bcc 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -1964,6 +1964,11 @@ static int method_cancel_scheduled_shutdown(sd_bus_message *message, void *userd
         m->scheduled_shutdown_type = NULL;
         m->scheduled_shutdown_timeout = 0;
 
+        if (m->unlink_nologin) {
+                unlink("/run/nologin");
+                m->unlink_nologin = false;
+        }
+
         if (cancelled) {
                 _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
                 const char *tty = NULL;



More information about the systemd-commits mailing list