From: Dietmar Maurer Date: Wed, 19 Mar 2014 05:50:47 +0000 (+0100) Subject: dont use undefined var $ifcount X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=5ffa7628c5c099b555a337d679c6894c5c7afefd dont use undefined var $ifcount --- diff --git a/data/PVE/Network.pm b/data/PVE/Network.pm index ce06a96..4677bf9 100644 --- a/data/PVE/Network.pm +++ b/data/PVE/Network.pm @@ -168,10 +168,10 @@ sub activate_bridge_vlan { my @ifaces = (); my $dir = "/sys/class/net/$bridge/brif"; PVE::Tools::dir_glob_foreach($dir, '((eth|bond)\d+)', sub { - push(@ifaces, $_[0]); + push @ifaces, $_[0]; }); - die "no physical interface on bridge '$bridge'\n" if $ifcount == 0; + die "no physical interface on bridge '$bridge'\n" if scalar(@ifaces) == 0; # add bridgevlan if it doesn't already exist if (! -d "/sys/class/net/$bridgevlan") {