summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
diff options
context:
space:
mode:
authorDirk von Suchodoletz2008-03-22 14:32:57 +0100
committerDirk von Suchodoletz2008-03-22 14:32:57 +0100
commit580b90b4dca5db4da7d08271418596c21f85dc22 (patch)
treec7a34cd1524177d5df9de631bc6564e7ead35737 /os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
parent* replaced busybox.i586 and .config with a version that includes syslogd and ... (diff)
downloadcore-580b90b4dca5db4da7d08271418596c21f85dc22.tar.gz
core-580b90b4dca5db4da7d08271418596c21f85dc22.tar.xz
core-580b90b4dca5db4da7d08271418596c21f85dc22.zip
Slightly improved version of the vmware plugin (at least it (de)installs
itself and the needed files) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1670 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm')
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm58
1 files changed, 46 insertions, 12 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
index 4ccb5850..5de71bf9 100644
--- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
@@ -125,28 +125,40 @@ sub getAttrInfo
default => '192.168.102.1/24',
},
# is to be discussed how to handle this - there is no single set of
- # vmware files!!
+ # vmware files!! -> to be moved to vmwarebinaries plugin!?
# attribute 'binaries' defines whether or not VMware binaries shall
# be provided (by downloading them).
- 'vmware::binaries' => {
- applies_to_vendor_os => 1,
- applies_to_systems => 0,
- applies_to_clients => 0,
+ #'vmware::binaries' => {
+ # applies_to_vendor_os => 1,
+ # applies_to_systems => 0,
+ # applies_to_clients => 0,
+ # description => unshiftHereDoc(<<' End-of-Here'),
+ # Shall VMware binaries be downloaded and installed?
+ # End-of-Here
+ # content_regex => qr{^(0|1)$},
+ # content_descr => 'Allowed values: 0 or 1',
+ # default => '0',
+ #},
+ # attribute 'kind' defines which set of VMware binaries should be
+ # activated ('local' provided with the main installation set).
+ 'vmware::kind' => {
+ applies_to_vendor_os => 0,
+ applies_to_systems => 1,
+ applies_to_clients => 1,
description => unshiftHereDoc(<<' End-of-Here'),
- Shall VMware binaries be downloaded and installed?
+ Which set of VMware binaries to use?
End-of-Here
content_regex => qr{^(0|1)$},
- content_descr => 'Allowed values: 0 or 1',
- default => '1',
+ content_descr => 'Allowed values: local, path to vmware installation',
+ default => 'local',
},
-
};
}
sub installationPhase
{
- my $self = shift;
-
+ my $self = shift;
+
$self->{pluginRepositoryPath} = shift;
$self->{pluginTempPath} = shift;
$self->{openslxPath} = shift;
@@ -160,6 +172,24 @@ sub installationPhase
foreach my $file (@files) {
copyFile("$pluginFilesPath/$file", $self->{'pluginRepositoryPath'});
}
+ # generate links for the user executables vmware and player and a
+ # simplified version of the start script
+ @files = qw( vmware vmplayer );
+ foreach my $file (@files) {
+ rename ("/usr/bin/$file", "/usr/bin/$file.slx-bak");
+ linkFile("/var/X11R6/bin/$file", "/usr/bin/$file");
+ my $script = unshiftHereDoc(<<" End-of-Here");
+ #!/bin/sh
+ # written by OpenSLX-plugin 'vmware' in Stage1
+ PREFIX=/usr/lib/vmware # depends on the vmware location
+ exec "\$PREFIX"'/lib/wrapper-gtk24.sh' \
+ "\$PREFIX"'/lib' \
+ "\$PREFIX"'/bin/vmware' \
+ "\$PREFIX"'/libconf' "$@"
+ End-of-Here
+ spitFile("$self->{'pluginRepositoryPath'}/$file", $script);
+ }
+
}
sub removalPhase
@@ -169,7 +199,11 @@ sub removalPhase
my $pluginTempPath = shift;
rmtree ( [ $pluginRepositoryPath ] );
-
+ # restore old start scripts
+ my @files = qw( vmware vmplayer );
+ foreach my $file (@files) {
+ rename ("/usr/bin/$file.slx-bak", "/usr/bin/$file");
+ }
return;
}