summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-07-02 09:53:16 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-02 13:56:59 +0200
commit01cf6bacd95a3c23aa0d2fe3f82a4a02ddb1cee3 (patch)
tree91787bf649b0650a1c9ea825487acc6f9f1b2afc
parent2167d8086daadde1bc104f91212661d2d9b2d69e (diff)
downloadsystemd-01cf6bacd95a3c23aa0d2fe3f82a4a02ddb1cee3.tar.gz
wait-online: improve timeout log message
The time-out when waiting to reach the online state is a pretty regularly seen error, let's print an explicit log message for it. The previous "Event loop failed: timed out" message is a bit too low-level I think for regular users (as event loops are a developer's concept, not a user's, really). Note that outputting low-level error messages is generally actually OK I think — for unexpected errors, but this timeout is a pretty expected one, directly configurable by the user, hence output something friendly.
-rw-r--r--src/network/wait-online/wait-online.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/wait-online/wait-online.c b/src/network/wait-online/wait-online.c
index c65b885d2c..a60f384624 100644
--- a/src/network/wait-online/wait-online.c
+++ b/src/network/wait-online/wait-online.c
@@ -223,6 +223,8 @@ static int run(int argc, char *argv[]) {
"STATUS=Failed to wait for network connectivity...");
r = sd_event_loop(m->event);
+ if (r == -ETIMEDOUT)
+ return log_error_errno(r, "Timeout occured while waiting for network connectivity.");
if (r < 0)
return log_error_errno(r, "Event loop failed: %m");