summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-05-19 18:42:14 +0200
committerTom Gundersen <teg@jklm.no>2014-05-19 18:42:14 +0200
commitbcb7a07e0a785bda1eed658e984ff6b4a11cba9a (patch)
treeca7b9498783bac32e153b2059cea24863a6642e4 /src/network/networkd-link.c
parentd408b506814a0f99590d946b3bf99b57ba78336b (diff)
networkd/sd-network: expose statically configured NTP servers
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index a90aff94e5..3ca86261b9 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -2027,8 +2027,10 @@ int link_save(Link *link) {
"FLAGS=%u\n",
admin_state, oper_state, link->flags);
- if (link->network)
+ if (link->network) {
serialize_addresses(f, "DNS", link->network->dns);
+ serialize_addresses(f, "NTP", link->network->ntp);
+ }
if (link->dhcp_lease) {
r = dhcp_lease_save(link->dhcp_lease, link->lease_file);
@@ -2037,8 +2039,11 @@ int link_save(Link *link) {
fprintf(f,
"DHCP_LEASE=%s\n"
- "DHCP_USE_DNS=%s\n",
- link->lease_file, yes_no(link->network->dhcp_dns));
+ "DHCP_USE_DNS=%s\n"
+ "DHCP_USE_NTP=%s\n",
+ link->lease_file,
+ yes_no(link->network->dhcp_dns),
+ yes_no(link->network->dhcp_ntp));
} else
unlink(link->lease_file);