Skip to content

Commit

Permalink
Merge pull request #20592 from nicksinger/no_nm_restart
Browse files Browse the repository at this point in the history
Do not automatically restart NM after static configuration
  • Loading branch information
nicksinger authored Nov 13, 2024
2 parents c05ccb1 + bc338f9 commit b27f174
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/mm_network.pm
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ sub setup_static_mm_network {
configure_static_ip(ip => $ip, is_nm => $is_nm);
configure_default_gateway(is_nm => $is_nm);
configure_static_dns(get_host_resolv_conf(), is_nm => $is_nm);
restart_networking(is_nm => $is_nm);
# Previous functions apply NM settings at runtime and no restart is required to apply them.
# Tracking if a restart is required troughout these functions would be cleaner but given their current implementation
# we can get away with not restarting if using NM.
restart_networking(is_nm => $is_nm) unless $is_nm;
}

sub restart_networking {
Expand Down

0 comments on commit b27f174

Please sign in to comment.