- if ((e = touch("/etc/nologin")) < 0)
- log_error("Failed to create /etc/nologin: %s", strerror(-e));
+ log_info("Creating /var/run/nologin, blocking further logins...");
+
+ if ((e = write_one_line_file("/var/run/nologin", "System is going down.")) < 0)
+ log_error("Failed to create /var/run/nologin: %s", strerror(-e));