chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: unlink /run/nologin when shutdown is cancelled
[elogind.git]
/
src
/
login
/
logind-dbus.c
diff --git
a/src/login/logind-dbus.c
b/src/login/logind-dbus.c
index 1f5cf865b1440824cd5680053ca4a9c99efe487f..3555bcc2f5c007f19b5d86b7a31ca250cb3359ff 100644
(file)
--- 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;
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;
if (cancelled) {
_cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
const char *tty = NULL;