fixes commit
89ea13ef6b1555f92309da5c298e16579163eaf4 and
restores old behavior, the "if !$trunks" post-if was a bit suble, it
did not guard the die, but the system command previously - the die
was || (ORd) to the command, bad code style to begin with..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
die "unable to add vlan $tag to interface $iface - $@\n" if $@;
warn "Caution: Setting VLAN ID 1 on a VLAN aware bridge may be dangerous\n" if $tag == 1;
- } else {
+ } elsif (!$trunks) {
eval { run_command(['/sbin/bridge', 'vlan', 'add', 'dev', $iface, 'vid', '2-4094']) };
- 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 $@;
}
if ($trunks) {