diff options
author | Lei YU <mine260309@gmail.com> | 2018-02-01 14:07:06 +0800 |
---|---|---|
committer | Lei YU <mine260309@gmail.com> | 2018-02-01 14:09:56 +0800 |
commit | 250011e6d1fa3905f228fbc853e4a8f37b091b32 (patch) | |
tree | a2d9999c2e9f845be0806f2b71fc9a866414c71a | |
parent | 067ca2d322a37aa1ad9d31077d55bbdb056e2cfd (diff) | |
download | phosphor-networkd-250011e6d1fa3905f228fbc853e4a8f37b091b32.tar.gz phosphor-networkd-250011e6d1fa3905f228fbc853e4a8f37b091b32.zip |
Reload systemd-networkd on NTPServer changes
systemd-timesyncd will not pick the updated NTP server list in network
config until systemd-networkd is reloaded.
So if NTPServers are updated in network config, reload networkd, and
timesyncd will automatically pick the updated NTP servers.
Resolves openbmc/openbmc#2859
Change-Id: I7c01a58d9d1652eee236c8818a41d66eda5b266e
Signed-off-by: Lei YU <mine260309@gmail.com>
-rw-r--r-- | ethernet_interface.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp index 0721eed..1e873c2 100644 --- a/ethernet_interface.cpp +++ b/ethernet_interface.cpp @@ -506,7 +506,7 @@ ServerList EthernetInterface::nTPServers(ServerList servers) writeConfigurationFile(); // timesynchd reads the NTP server configuration from the // network file. - restartSystemdUnit(timeSynchdService); + restartSystemdUnit(networkdService); return ntpServers; } // Need to merge the below function with the code which writes the @@ -719,7 +719,7 @@ std::string EthernetInterface::mACAddress(std::string value) // ip for the changed mac address. if (dHCPEnabled()) { - restartSystemdUnit("systemd-networkd.service"); + restartSystemdUnit(networkdService); } return mac; |