Signed-off-by: Alexandre Derumier <aderum...@odiso.com> --- PVE/API2/Network.pm | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm index 5e2abda1..07c3e6d3 100644 --- a/PVE/API2/Network.pm +++ b/PVE/API2/Network.pm @@ -16,6 +16,12 @@ use IO::File; use base qw(PVE::RESTHandler); +my $have_sdn; +eval { + require PVE::API2::Network::SDN; + $have_sdn = 1; +}; + my $iflockfn = "/etc/network/.pve-interfaces.lock"; my $bond_mode_enum = [ @@ -554,6 +560,11 @@ __PACKAGE__->register_method({ rename($new_config_file, $current_config_file) if -e $new_config_file; + if ($have_sdn) { + my $rawconfig = PVE::Network::SDN::generate_etc_network_config(); + PVE::Network::SDN::write_etc_network_config($rawconfig); + } + my $cmd = ['ifreload', '-a']; my $err = sub { -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel