Convert all systemd-networkd service restarts to reloads

This removes all of the current invocations of managed service
restarting, and instead opts for targeted reloading of
configuration files.

It also happens to fix some bugs around NIC enabled setting, as the
systemd-networkd service now has up to date runtime configurations at
the time that objects are refreshed.

Change-Id: I64cd4f3fcd66eb2ad23b973eb86a71606e528e37
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/network_manager_main.cpp b/src/network_manager_main.cpp
index 983616f..fb08fdf 100644
--- a/src/network_manager_main.cpp
+++ b/src/network_manager_main.cpp
@@ -309,13 +309,9 @@
     // is not there for any interface.
     // Parameter false means don't create the network
     // files forcefully.
-    if (!phosphor::network::manager->createDefaultNetworkFiles(false))
+    if (phosphor::network::manager->createDefaultNetworkFiles(false))
     {
-        // this will add the additional fixes which is needed
-        // in the existing network file.
-        phosphor::network::manager->writeToConfigurationFile();
-        // whenever the configuration file gets written it restart
-        // the network which creates the network objects
+        phosphor::network::manager->reloadConfigs();
     }
 
     // RtnetLink socket
@@ -331,5 +327,9 @@
     in >> configJson;
     phosphor::network::watchEthernetInterface(bus, configJson);
 #endif
+
+    // Trigger the initial object scan
+    phosphor::network::refreshObjects();
+
     sd_event_loop(eventPtr.get());
 }