Create the default network file during startup of network manager
if network file is not on the system then create the default network
file with dhcp enabled.
Resolves openbmc/openbmc#2332
Change-Id: I9e523c76f684dcb2951a0a730f94b11f326b5489
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/network_manager.hpp b/network_manager.hpp
index 0d15fc6..70ed8fc 100644
--- a/network_manager.hpp
+++ b/network_manager.hpp
@@ -94,11 +94,19 @@
*/
const DHCPConfPtr& getDHCPConf() { return dhcpConf; }
- private:
+ /** @brief create the default network files for each interface
+ * @detail if force param is true then forcefully create the network
+ * files otherwise if network file doesn't exist then
+ * create it.
+ * @param[in] force - forcefully create the file
+ * @return true if network file created else false
+ */
+ bool createDefaultNetworkFiles(bool force);
/** @brief restart the systemd networkd. */
void restartNetwork();
+ private:
/** @brief Persistent sdbusplus DBus bus connection. */
sdbusplus::bus::bus& bus;