diff options
author | Dirk von Suchodoletz | 2008-03-22 14:32:57 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2008-03-22 14:32:57 +0100 |
commit | 580b90b4dca5db4da7d08271418596c21f85dc22 (patch) | |
tree | c7a34cd1524177d5df9de631bc6564e7ead35737 | |
parent | * replaced busybox.i586 and .config with a version that includes syslogd and ... (diff) | |
download | core-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
-rw-r--r-- | initramfs/initrd-stuff/etc/messages | 1 | ||||
-rw-r--r-- | initramfs/initrd-stuff/etc/messages.de | 1 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 58 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/XX_vmware.sh | 6 |
4 files changed, 46 insertions, 20 deletions
diff --git a/initramfs/initrd-stuff/etc/messages b/initramfs/initrd-stuff/etc/messages index da5fb4fb..7c990da8 100644 --- a/initramfs/initrd-stuff/etc/messages +++ b/initramfs/initrd-stuff/etc/messages @@ -156,7 +156,6 @@ df_errcron=" The cron start script $df_errserv" df_errsysl=" The syslog start script $df_errserv" df_errsshd=" The sshd start script $df_errserv" df_erryp=" The NIS client $df_errserv" -df_errvmw=" VMware X86 emulation $df_errserv" df_erramnt=" Automounter $df_errserv" df_errnsc=" Name Service caching deamon $df_errserv\n This service might \ be useful to take load from a ldap user directory." diff --git a/initramfs/initrd-stuff/etc/messages.de b/initramfs/initrd-stuff/etc/messages.de index 6e7580e1..d74ad66b 100644 --- a/initramfs/initrd-stuff/etc/messages.de +++ b/initramfs/initrd-stuff/etc/messages.de @@ -163,7 +163,6 @@ df_errcron=" Das cron Start-Skript $df_errserv" df_errsysl=" Das syslog Start-Skript $df_errserv" df_errsshd=" Das sshd Start-Skript $df_errserv" df_erryp=" Der NIS-Klient $df_errserv" -df_errvmw=" Die VMware X86 Emulation $df_errserv" df_erramnt=" Der Automounter $df_errserv" df_errnsc=" Der Name Service Zwischenspeicherungs Daemon $df_errserv\n \ Dieser Dienst koennte nuetzlich sein, um Daten von einem ldap Benutzer-\ 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; } diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh index e1d0d84b..00ee4bfd 100644 --- a/os-plugins/plugins/vmware/XX_vmware.sh +++ b/os-plugins/plugins/vmware/XX_vmware.sh @@ -25,18 +25,12 @@ if [ -e /initramfs/plugin-conf/vmware.conf ]; then . /initramfs/plugin-conf/vmware.conf # Test if this plugin is activated... - # TODO: err... I think we could save this test due of a changed - # plugin system if [ $vmware_active -ne 0 ]; then [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'vmware' os-plugin ..."; - # Load general configuration . /initramfs/machine-setup - # we need to load the function file for: - # uri_token, testmkd . /etc/functions - # D_INITDIR is defined in the following file: . /etc/sysconfig/config # prepare all needed vmware configuration files |