mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-11 04:58:19 +03:00
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.
This commit is contained in:
parent
2167d8086d
commit
01cf6bacd9
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user