summaryrefslogtreecommitdiff
path: root/src/nm-manager.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-05-27 12:10:45 +0200
committerLubomir Rintel <lkundrak@v3.sk>2019-05-28 11:15:56 +0200
commit3b85b9f1a615d3b1dc7d50be04c1f4c498bf5f53 (patch)
tree8b9126cb3f897aa159aad6f34eda9397a5ff856a /src/nm-manager.c
parente1b824b871b40d7f033ebd2fcbe80331b0b14e4c (diff)
downloadNetworkManager-lr/next-server.tar.gz
config: also save next-server in the state filelr/next-server
The early boot tooling gets the root-path from our state file due to a better way to do that. However, when booting with NFS root, the root path alone is not sufficient; the server address is communicated via the next-server option. Save that one in the state file as well.
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r--src/nm-manager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index b6beb61286..06bf216737 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -6421,6 +6421,7 @@ nm_manager_write_device_state (NMManager *self, NMDevice *device)
guint32 route_metric_default_effective;
int nm_owned;
NMDhcp4Config *dhcp4_config;
+ const char *next_server = NULL;
const char *root_path = NULL;
ifindex = nm_device_get_ip_ifindex (device);
@@ -6458,8 +6459,10 @@ nm_manager_write_device_state (NMManager *self, NMDevice *device)
TRUE, &route_metric_default_aspired);
dhcp4_config = nm_device_get_dhcp4_config (device);
- if (dhcp4_config)
+ if (dhcp4_config) {
root_path = nm_dhcp4_config_get_option (dhcp4_config, "root_path");
+ next_server = nm_dhcp4_config_get_option (dhcp4_config, "next_server");
+ }
return nm_config_device_state_write (ifindex,
managed_type,
@@ -6468,6 +6471,7 @@ nm_manager_write_device_state (NMManager *self, NMDevice *device)
nm_owned,
route_metric_default_aspired,
route_metric_default_effective,
+ next_server,
root_path);
}