summaryrefslogtreecommitdiffstats
path: root/loader/net.c
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-09-05 18:09:10 -0400
committerChris Lumens <clumens@redhat.com>2008-09-05 18:09:24 -0400
commit1d3e456924a8b79a85b0fb8d1621624bd3e68c55 (patch)
treefef499b12b5e2c74fc20edf1aef079d24c0cb370 /loader/net.c
parente2b9a1c7f6ae5d4366410a18f521434df415fc97 (diff)
downloadanaconda-1d3e456924a8b79a85b0fb8d1621624bd3e68c55.tar.gz
anaconda-1d3e456924a8b79a85b0fb8d1621624bd3e68c55.tar.xz
anaconda-1d3e456924a8b79a85b0fb8d1621624bd3e68c55.zip
Make NM work for the DHCP case, at least (dcbw) (#461071).
This patch does two things: (1) It makes sure that NM doesn't run more than once, though we still need to figure out why it's being asked to start up several times. (2) Block the rest of the network configuration process from running until after NM is up and we can talk to it. This fixes the traceback where nothing is providing the .services file. We still need to investigate whether static network configuration works and how the UI flows in error cases.
Diffstat (limited to 'loader/net.c')
-rw-r--r--loader/net.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/loader/net.c b/loader/net.c
index 0eb0fe2f7..3dd7fe9c9 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1730,6 +1730,8 @@ int get_connection(iface_t *iface) {
dbus_uint32_t state = 0;
char *nm_iface = "org.freedesktop.NetworkManager";
char *property = "State";
+ int ret;
+ char *error_str = NULL;
if (iface == NULL) {
return 1;
@@ -1745,13 +1747,6 @@ int get_connection(iface_t *iface) {
iface->device, 0);
}
- /* start NetworkManager for configured interface */
- logMessage(INFO, "starting NetworkManager (%d) for %s", __LINE__,
- iface->device);
- if (iface_start_NetworkManager() > 0) {
- return 2;
- }
-
dbus_error_init(&error);
connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
if (connection == NULL) {
@@ -1761,6 +1756,16 @@ int get_connection(iface_t *iface) {
dbus_error_free(&error);
}
+ return 2;
+ }
+
+ /* start NetworkManager for configured interface */
+ logMessage(INFO, "starting NetworkManager (%d) for %s", __LINE__,
+ iface->device);
+ ret = iface_start_NetworkManager(connection, &error_str);
+ if (ret != 0) {
+ logMessage(INFO, "failed to start NetworkManager (%d) for %s: error %d (%s)",
+ __LINE__, iface->device, ret, error_str ? error_str : "unknown");
return 3;
}