]> git.proxmox.com Git - pve-manager.git/commitdiff
check if ovs is installed when creation ovs network components
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 27 Dec 2013 08:52:22 +0000 (09:52 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 27 Dec 2013 08:52:22 +0000 (09:52 +0100)
PVE/API2/Network.pm

index 2a71ffd0b9e4ea3ad3fda6a77af301173e04cca2..fe1a0f0bf3a079d0796298add6fea8b728fadae6 100644 (file)
@@ -241,6 +241,11 @@ __PACKAGE__->register_method({
 
            $param->{method} = $param->{address} ? 'static' : 'manual'; 
 
+           if ($param->{type} =~ m/^OVS/) {
+               -x '/usr/bin/ovs-vsctl' ||
+                   die "Open VSwitch is not installed (need package 'openvswitch-switch')\n";
+           }
+
            if ($param->{type} eq 'OVSIntPort' || $param->{type} eq 'OVSBond') {
                my $brname = $param->{ovs_bridge};
                raise_param_exc({ ovs_bridge => "parameter is required" }) if !$brname;