mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
networkd: rework startup
Open all listenerns before loading configuration.
This commit is contained in:
parent
63edaa623b
commit
f0c4cd7a2c
@ -51,24 +51,12 @@ int main(int argc, char *argv[]) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = manager_load_config(m);
|
||||
if (r < 0) {
|
||||
log_error("Could not load configuration files: %s", strerror(-r));
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = manager_udev_listen(m);
|
||||
if (r < 0) {
|
||||
log_error("Could not connect to udev: %s", strerror(-r));
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = manager_udev_enumerate_links(m);
|
||||
if (r < 0) {
|
||||
log_error("Could not enumerate links: %s", strerror(-r));
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = manager_rtnl_listen(m);
|
||||
if (r < 0) {
|
||||
log_error("Could not connect to rtnl: %s", strerror(-r));
|
||||
@ -81,6 +69,18 @@ int main(int argc, char *argv[]) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = manager_load_config(m);
|
||||
if (r < 0) {
|
||||
log_error("Could not load configuration files: %s", strerror(-r));
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = manager_udev_enumerate_links(m);
|
||||
if (r < 0) {
|
||||
log_error("Could not enumerate links: %s", strerror(-r));
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* write out empty resolv.conf to avoid a
|
||||
* dangling symlink */
|
||||
r = manager_update_resolv_conf(m);
|
||||
|
Loading…
x
Reference in New Issue
Block a user