]> err.no Git - systemd/commitdiff
shutdownd: kill /etc/nologin file before we go down
authorLennart Poettering <lennart@poettering.net>
Mon, 16 Aug 2010 21:52:19 +0000 (23:52 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 16 Aug 2010 21:52:19 +0000 (23:52 +0200)
src/shutdownd.c

index 59439bca850cb2d719ac5307aff5d6abe59b98cd..5ff9b4ae127b0ee1b0888ff774fdfc8b6afb3831 100644 (file)
@@ -345,6 +345,9 @@ finish:
                 if (pollfd[i].fd >= 0)
                         close_nointr_nofail(pollfd[i].fd);
 
+        if (unlink_nologin)
+                unlink("/etc/nologin");
+
         if (exec_shutdown) {
                 char sw[3];
 
@@ -363,9 +366,6 @@ finish:
                 log_error("Failed to execute /sbin/shutdown: %m");
         }
 
-        if (unlink_nologin)
-                unlink("/etc/nologin");
-
         sd_notify(false,
                   "STATUS=Exiting...");