ovs-brcompatd: Don't include the local port in BRCTL_GET_PORT_LIST output.
[openvswitch] / vswitchd / ovs-vswitchd.c
index 01a0e7edf2d03e50cc37b205715278f39c1dc9c2..01645adf9e27a71f33327bd77a7b20cc5acfa271 100644 (file)
@@ -80,7 +80,10 @@ main(int argc, char *argv[])
     }
     unixctl_command_register("vswitchd/reload", reload);
 
-    cfg_read();
+    retval = cfg_read();
+    if (retval) {
+        ovs_fatal(retval, "could not read config file");
+    }
     mgmt_init();
     bridge_init();
     port_init();
@@ -93,7 +96,9 @@ main(int argc, char *argv[])
             vlog_reopen_log_file();
             reconfigure();
         }
-        mgmt_run();
+        if (mgmt_run()) {
+            need_reconfigure = true;
+        }
         if (bridge_run()) {
             need_reconfigure = true;
         }
@@ -217,6 +222,7 @@ parse_options(int argc, char *argv[])
                 "use --help for usage");
     }
 
+    cfg_init();
     config_file = argv[0];
     error = cfg_set_file(config_file);
     if (error) {