networkd: rework startup

Open all listenerns before loading configuration.
This commit is contained in:
Tom Gundersen 2014-03-10 23:40:34 +01:00
parent 63edaa623b
commit f0c4cd7a2c

View file

@ -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);