Skip to content

Commit

Permalink
Do not automatically restart NM after static configuration
Browse files Browse the repository at this point in the history
NM changes happen at runtime and automatically restarting it just wastes
time and introduces more options to fail without providing any benefit.

Related issue: https://progress.opensuse.org/issues/169531
  • Loading branch information
nicksinger committed Nov 11, 2024
1 parent 7039781 commit bc338f9
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 bc338f9

Please sign in to comment.