File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -844,6 +844,9 @@ netplan_netdef_write_network_file(
844
844
if (def -> type >= NETPLAN_DEF_TYPE_VIRTUAL || def -> ignore_carrier )
845
845
g_string_append (network , "ConfigureWithoutCarrier=yes\n" );
846
846
847
+ if (def -> critical )
848
+ g_string_append_printf (network , "KeepConfiguration=true\n" );
849
+
847
850
if (def -> bridge && def -> backend != NETPLAN_BACKEND_OVS ) {
848
851
g_string_append_printf (network , "Bridge=%s\n" , def -> bridge );
849
852
@@ -916,14 +919,11 @@ netplan_netdef_write_network_file(
916
919
}
917
920
}
918
921
919
- if (def -> dhcp4 || def -> dhcp6 || def -> critical ) {
922
+ if (def -> dhcp4 || def -> dhcp6 ) {
920
923
/* NetworkManager compatible route metrics */
921
924
g_string_append (network , "\n[DHCP]\n" );
922
925
}
923
926
924
- if (def -> critical )
925
- g_string_append_printf (network , "KeepConfiguration=true\n" );
926
-
927
927
if (def -> dhcp4 || def -> dhcp6 ) {
928
928
if (def -> dhcp_identifier )
929
929
g_string_append_printf (network , "ClientIdentifier=%s\n" , def -> dhcp_identifier );
Original file line number Diff line number Diff line change @@ -480,8 +480,6 @@ def test_dhcp_critical_true(self):
480
480
481
481
[Network]
482
482
LinkLocalAddressing=ipv6
483
-
484
- [DHCP]
485
483
KeepConfiguration=true
486
484
''' })
487
485
You can’t perform that action at this time.
0 commit comments