mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-15 12:01:50 +00:00
network: fix uninitialized value error
This commit is contained in:
parent
8992139368
commit
846337ad41
@ -177,10 +177,12 @@ my $bridge_add_interface = sub {
|
|||||||
die "unable to add default vlan tags to interface $iface\n" if !$trunks;
|
die "unable to add default vlan tags to interface $iface\n" if !$trunks;
|
||||||
}
|
}
|
||||||
|
|
||||||
my @trunks_array = split /;/, $trunks;
|
if ($trunks) {
|
||||||
foreach my $trunk (@trunks_array) {
|
my @trunks_array = split /;/, $trunks;
|
||||||
system("/sbin/bridge vlan add dev $iface vid $trunk") == 0 ||
|
foreach my $trunk (@trunks_array) {
|
||||||
die "unable to add vlan $trunk to interface $iface\n";
|
system("/sbin/bridge vlan add dev $iface vid $trunk") == 0 ||
|
||||||
|
die "unable to add vlan $trunk to interface $iface\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user