wait-online: exit with success when all interfaces are ready or unmanaged
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 22 Dec 2022 00:40:37 +0000 (09:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 22 Dec 2022 00:40:46 +0000 (09:40 +0900)
commitab3aed4a0349bbaa26f53340770c1b59b463e05d
tree7554fa5206a917e7e4d7436cbea9d453bdd0fc86
parentcf451f382a6ebf6ad34b36939ed4f8dee1c04e61
wait-online: exit with success when all interfaces are ready or unmanaged

Previously, when neither '--any' nor '--interface' options specified,
at least one of the interfaces must be in configured state.
This patch makes wait-online exit with success even if all interfaces
are in unmanaged state.

This may break backward compatibility in a rare situation. But in most
cases, this typically not change anything, as at least one interface
is managed by networkd.service when it is enabled.

This is mostly for making wait-online gracefully handle the case that
networkd.service and wait-online.service are enabled by mistake. In such
situation, all interfaces are typically not managed.

Fixes #25813.
src/network/wait-online/manager.c