]> git.proxmox.com Git - pve-common.git/commitdiff
fixup: don't use exists boolean
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 10 Jul 2018 10:00:14 +0000 (12:00 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 10 Jul 2018 10:08:04 +0000 (12:08 +0200)
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 <w.bumiller@proxmox.com>
src/PVE/INotify.pm

index 330085066f29f461329494084d7a654c0149e7a3..6892b4c6bf25eb517a881874437aaf9e56e0e32f 100644 (file)
@@ -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";