From: Daniel Mack Date: Tue, 26 May 2015 16:56:40 +0000 (+0200) Subject: logind: unlink /run/nologin when shutdown is cancelled X-Git-Tag: v226.4~1^2~348 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=7c1bdaf7addb55f8f06117199da4cfbbb6a3fb6b;ds=sidebyside 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 1f5cf865b..3555bcc2f 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;