1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-09 01:18:19 +03:00

network/state-file: save assigned .netdev file even if the interface is unmanaged

Follow-up for 2cf9b1a0ee.
This commit is contained in:
Yu Watanabe 2024-09-10 16:35:27 +09:00
parent d0899c6a55
commit f49c8e6553

View File

@ -623,6 +623,12 @@ static int link_save(Link *link) {
"IPV6_ADDRESS_STATE=%s\n",
admin_state, oper_state, carrier_state, address_state, ipv4_address_state, ipv6_address_state);
if (link->netdev) {
r = serialize_config_files(f, "NETDEV", link->netdev->filename, link->netdev->dropins);
if (r < 0)
return r;
}
if (link->network) {
const char *online_state, *captive_portal;
bool space = false;
@ -650,12 +656,6 @@ static int link_save(Link *link) {
if (r < 0)
return r;
if (link->netdev) {
r = serialize_config_files(f, "NETDEV", link->netdev->filename, link->netdev->dropins);
if (r < 0)
return r;
}
/************************************************************/
fputs("DNS=", f);