mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-13 13:41:27 +00:00
Merge pull request #643 from zonque/fileio
basic/fileio: fix write_string_file() fallout
This commit is contained in:
@@ -1774,7 +1774,7 @@ static int nologin_timeout_handler(
|
||||
|
||||
log_info("Creating /run/nologin, blocking further logins...");
|
||||
|
||||
r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_ATOMIC);
|
||||
r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC);
|
||||
if (r < 0)
|
||||
log_error_errno(r, "Failed to create /run/nologin: %m");
|
||||
else
|
||||
|
||||
@@ -65,7 +65,7 @@ int main(int argc, char*argv[]) {
|
||||
} else if (streq(argv[1], "stop")) {
|
||||
int r;
|
||||
|
||||
r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_ATOMIC);
|
||||
r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC);
|
||||
if (r < 0) {
|
||||
log_error_errno(r, "Failed to create /run/nologin: %m");
|
||||
return EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user