]> git.proxmox.com Git - pve-container.git/commitdiff
followup whitespace and style fixes
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Mar 2020 18:40:16 +0000 (19:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Mar 2020 18:40:16 +0000 (19:40 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/LXC.pm
src/lxcnetaddbr

index 0245dfb1375754b70473e4f37d785dfd2ad7c9ca..0742a53acfa07f60ed451930cbc250504e3889c7 100644 (file)
@@ -918,7 +918,7 @@ sub update_net {
                    PVE::LXC::Config->write_config($vmid, $conf);
                }
 
-               if($have_sdn) {
+               if ($have_sdn) {
                    PVE::Network::SDN::Zones::tap_plug($veth, $newnet->{bridge}, $newnet->{tag}, $newnet->{firewall}, $newnet->{trunks}, $newnet->{rate});
                } else {
                    PVE::Network::tap_plug($veth, $newnet->{bridge}, $newnet->{tag}, $newnet->{firewall}, $newnet->{trunks}, $newnet->{rate});
@@ -951,7 +951,7 @@ sub hotplug_net {
     my $vethpeer = $veth . "p";
     my $eth = $newnet->{name};
 
-    if($have_sdn) {
+    if ($have_sdn) {
        PVE::Network::SDN::Zones::veth_create($veth, $vethpeer, $newnet->{bridge}, $newnet->{hwaddr});
        PVE::Network::SDN::Zones::tap_plug($veth, $newnet->{bridge}, $newnet->{tag}, $newnet->{firewall}, $newnet->{trunks}, $newnet->{rate});
     } else {
index ddc87f73629798fea7332beb445bbfff16b5da67..04a121d99284ffb96235ecf68d345fd8b5346814 100755 (executable)
@@ -9,6 +9,7 @@ use PVE::LXC;
 use PVE::Tools qw(run_command);
 use PVE::Network;
 use PVE::ProcFSTools;
+
 my $have_sdn;
 eval {
     require PVE::Network::SDN::Zones;
@@ -23,7 +24,7 @@ die "got unexpected argument ($arg2 != net)\n" if $arg2 ne 'net';
 die "got unexpected argument ($arg3 != up)\n" if $arg3 ne 'up';
 
 die "got unexpected argument ($type != veth)\n" if $type ne 'veth';
-    
+
 die "got unexpected environment" if $vmid ne $ENV{LXC_NAME};
 
 die "missing vmid parameter\n" if !$vmid;
@@ -41,7 +42,7 @@ die "unable to find network definition for interface '$iface'\n"
     if !defined($netconf);
 
 my $net = PVE::LXC::Config->parse_lxc_network($netconf);
-    
+
 my $tag = $net->{tag};
 my $firewall = $net->{firewall};
 my $bridge = $net->{bridge};
@@ -52,9 +53,9 @@ die "missing bridge configuration" if !$bridge;
 
 if (-d "/sys/class/net/$iface") {
 
-    if($have_sdn) {
+    if ($have_sdn) {
        ($bridge, undef) = PVE::Network::SDN::Zones::get_bridge_vlan($bridge);
-    } 
+    }
 
     my $bridgemtu = PVE::Tools::file_read_firstline("/sys/class/net/$bridge/mtu");
     die "bridge '$bridge' does not exist\n" if !$bridgemtu;
@@ -64,7 +65,7 @@ if (-d "/sys/class/net/$iface") {
     PVE::Tools::run_command("/sbin/ip link set dev $iface up mtu $bridgemtu");
     PVE::Tools::run_command("/sbin/ip addr add 0.0.0.0/0 dev $iface");
 
-    if($have_sdn) {
+    if ($have_sdn) {
        PVE::Network::SDN::Zones::tap_plug($iface, $net->{bridge}, $tag, $firewall, $trunks, $rate);
     } else {
        PVE::Network::tap_plug($iface, $bridge, $tag, $firewall, $trunks, $rate);