diff --git a/src/core/shutdown.c b/src/core/shutdown.c index a2309b7726..a7d5e57936 100644 --- a/src/core/shutdown.c +++ b/src/core/shutdown.c @@ -403,7 +403,7 @@ int main(int argc, char *argv[]) { _cleanup_free_ char *param = NULL; r = read_one_line_file("/run/systemd/reboot-param", ¶m); - if (r < 0) + if (r < 0 && r != -ENOENT) log_warning_errno(r, "Failed to read reboot parameter file: %m"); if (!isempty(param)) { diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 8b42a93ba3..2f69e863c5 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -8260,7 +8260,7 @@ static int halt_now(enum action a) { _cleanup_free_ char *param = NULL; r = read_one_line_file("/run/systemd/reboot-param", ¶m); - if (r < 0) + if (r < 0 && r != -ENOENT) log_warning_errno(r, "Failed to read reboot parameter file: %m"); if (!isempty(param)) {