X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FINotify.pm;fp=src%2FPVE%2FINotify.pm;h=f524672e6cfd6827ceea891bffa44bd0f2996344;hp=c50751560b20de5955fee91a46ab7d4394c0c3c1;hb=8342b610eab52ede9833fe2b3663313a93e53cc5;hpb=7157e9bd9836b8246ba4a4d477aa1fae23f44eca diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index c507515..f524672 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -1236,8 +1236,8 @@ sub __interface_to_string { # not printing out options } elsif ($d->{type} eq 'bridge') { - $d->{bridge_ports} =~ s/[;,\s]+/ /g; my $ports = $d->{bridge_ports} || 'none'; + $ports =~ s/[;,\s]+/ /g; $raw .= "\tbridge-ports $ports\n"; $done->{bridge_ports} = 1; @@ -1605,7 +1605,7 @@ sub __write_etc_network_interfaces { foreach my $iface (keys %$ifaces_copy) { my $d = $ifaces_copy->{$iface}; if ($d->{type} eq 'bridge') { - foreach my $p (split (/\s+/, $d->{bridge_ports})) { + foreach my $p (split (/\s+/, $d->{bridge_ports} // '')) { if($p =~ m/(\S+)\.(\d+)$/) { my $vlanparent = $1; if (!defined($ifaces_copy->{$p})) {