From: Wolfgang Bumiller Date: Tue, 10 Jul 2018 10:00:14 +0000 (+0200) Subject: fixup: don't use exists boolean X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=fc158d0d9c99ed4523e30043a3705f812445c7b5 fixup: don't use exists boolean The previous condition didn't fail tests because it was always false. The 'exists' property is not actually usable when writing the interface file. It is merely a hint that the interface existed in /proc/net/dev while parsing the interfaces file and is otherwise actually unused here. Simply check for the existence of the interface in $ifaces. Signed-off-by: Wolfgang Bumiller --- diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 3300850..6892b4c 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -1385,7 +1385,7 @@ sub __write_etc_network_interfaces { my $n = $ifaces->{$p}; die "vlan '$iface' - unable to find parent '$p'\n" - if $n->{exists} eq 0; + if !$n; if ($n->{type} eq 'bridge' && !$n->{bridge_vlan_aware}) { die "vlan '$iface' - bridge vlan aware is not enabled on parent '$p'\n";