diff options
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 76e642758d..a37561a04a 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1726,6 +1726,10 @@ int link_save(Link *link) { fputs("DNS=", f); + STRV_FOREACH(address, link->network->dns) + fprintf(f, "%s%s", *address, + (address + 1 ? " " : "")); + if (link->network->dhcp_dns && link->dhcp_lease) { const struct in_addr *addresses; @@ -1738,14 +1742,14 @@ int link_save(Link *link) { } } - STRV_FOREACH(address, link->network->dns) - fprintf(f, "%s%s", *address, - (address + 1 ? " " : "")); - fputs("\n", f); fprintf(f, "NTP="); + STRV_FOREACH(address, link->network->ntp) + fprintf(f, "%s%s", *address, + (address + 1 ? " " : "")); + if (link->network->dhcp_ntp && link->dhcp_lease) { const struct in_addr *addresses; @@ -1758,14 +1762,14 @@ int link_save(Link *link) { } } - STRV_FOREACH(address, link->network->ntp) - fprintf(f, "%s%s", *address, - (address + 1 ? " " : "")); - fputs("\n", f); fprintf(f, "DOMAINS="); + STRV_FOREACH(domain, link->network->domains) + fprintf(f, "%s%s", *domain, + (domain + 1 ? " " : "")); + if (link->network->dhcp_domains && link->dhcp_lease) { const char *domainname; @@ -1778,10 +1782,6 @@ int link_save(Link *link) { } } - STRV_FOREACH(domain, link->network->domains) - fprintf(f, "%s%s", *domain, - (domain + 1 ? " " : "")); - fputs("\n", f); fprintf(f, "WILDCARD_DOMAIN=%s\n", |