From 10383ecb6cfd36cf1f414b1eef0cd10adb7cfb9c Mon Sep 17 00:00:00 2001 From: Volker Uhrig Date: Sat, 5 Jul 2008 15:35:19 +0000 Subject: * Added Stage3 Attribute check git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1902 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm') diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index aeecc068..768762f5 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -250,6 +250,45 @@ sub removalPhase return; } +sub checkStage3AttrValues +{ + my $self = shift; + my $stage3Attrs = shift; + my $vendorOSAttrs = shift; + my @problems; + + my $vm_kind = $stage3Attrs->{'vmware::kind'} || ''; + + + print "DEBUG $vm_kind\n"; + my $vmimg = $stage3Attrs->{'vmware::imgsrc'} || ''; + print "DEBUG $vmimg\n"; + + if ($vm_kind eq 'local' && ! -x "/usr/lib/vmware/bin/vmware") { + push @problems, _tr( + "No local executeable installation of vmware found! Using it as virtual machine wouldn't work!" + ); + } + + if ($vm_kind eq 'vmpl2.0' && + ! -d "/opt/openslx/plugin-repo/vmware/vmpl2.0/vmroot") { + push @problems, _tr( + "No OpenSLX installation of VMware Player 2 found or installation failed. Using it as virtual machine wouldn't work!" + ); + } + + if ($vm_kind eq 'vmpl1.0' && + ! -d "/opt/openslx/plugin-repo/vmware/vmpl1.0/vmroot") { + push @problems, _tr( + "No OpenSLX installation of VMware Player 2 found or installation failed. Using it as virtual machine wouldn't work!" + ); + } + + return if !@problems; + + return \@problems; +} + ####################################### ## local, non-general OpenSLX functions -- cgit v1.2.3-55-g7522