summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/OpenSLX/Distro
diff options
context:
space:
mode:
authorVolker Uhrig2008-06-07 21:52:48 +0200
committerVolker Uhrig2008-06-07 21:52:48 +0200
commit7796d07fd918175dd2ab795c8928d88a47a392c2 (patch)
treef75b839fb5710fc259345849eb41e84287b2ede6 /os-plugins/plugins/vmware/OpenSLX/Distro
parent* made support for chrooted shells and updates explicit in vendor-OS list, (diff)
downloadcore-7796d07fd918175dd2ab795c8928d88a47a392c2.tar.gz
core-7796d07fd918175dd2ab795c8928d88a47a392c2.tar.xz
core-7796d07fd918175dd2ab795c8928d88a47a392c2.zip
* finished implementation of vmpl2.0 installation
* tested successfull on suse 10.2 (vmpl2.0 and local installation) * some minor (optical) changes * some more errorhandling for invalid configuration needed * theres a need for tests on debian-based systems * Configuration: http://openslx.org/trac/de/openslx/wiki/vmware git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1859 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware/OpenSLX/Distro')
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm26
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm23
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm22
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm22
4 files changed, 66 insertions, 27 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm
index 2dfc2700..20769ca4 100644
--- a/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm
@@ -36,7 +36,7 @@ sub initialize
{
my $self = shift;
my $engine = shift;
-
+
return 1;
}
@@ -53,7 +53,7 @@ sub fillRunlevelScript
# Copyright 1998-2007 VMware, Inc. All rights reserved.
#
# This script manages the services needed to run VMware software
-
+
# Basic support for the Linux Standard Base Specification 1.3
### BEGIN INIT INFO
# Provides: VMware
@@ -65,10 +65,19 @@ sub fillRunlevelScript
# Description: Manages the services needed to run VMware software
### END INIT INFO
load_modules() {
- # to be filled in via the stage1 configuration script
- modprobe -qa vmmon vmnet vmblock 2>/dev/null || echo "Problem here!"
- # most probably nobody wants to run the parallel port driver ...
- #modprobe vm...
+ if [ \${vmware_kind} = "local" ]; then
+ # to be filled in via the stage1 configuration script
+ modprobe -qa vmmon vmnet vmblock 2>/dev/null || return 1
+ # most probably nobody wants to run the parallel port driver ...
+ #modprobe vm...
+ else
+ # load module manuall
+ vmware_kind_path=/opt/openslx/plugin-repo/vmware/\${vmware_kind}/
+ module_src_path=\${vmware_kind_path}/root/lib/vmware/modules/source
+ insmod \${module_src_path}/vmblock.o
+ insmod \${module_src_path}/vmmon.o
+ insmod \${module_src_path}/vmnet.o
+ fi
}
unload_modules() {
# to be filled with the proper list within via the stage1 configuration
@@ -135,8 +144,9 @@ sub fillRunlevelScript
echo "Stopping vmware background services ..."
killall vmnet-netifup vmnet-natd vmnet-bridge vmware vmplayer \\
vmware-tray vmnet-dhcpd 2>/dev/null
- # wait for shutting down of interfaces
- usleep 50000
+ # wait for shutting down of interfaces... vmnet needs kinda
+ # long
+ usleep 500000
unload_modules
;;
#status)
diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm
index 5991d6ad..e1c7e2e4 100644
--- a/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm
@@ -52,11 +52,19 @@ sub fillRunlevelScript
### END INIT INFO
load_modules() {
- # to be filled in via the stage1 configuration script
- #TODO: everything behind || is not equal to Suse.pm
- modprobe -qa vmmon vmnet vmblock 2>/dev/null || echo "Problem here!"
- # most probably nobody wants to run the parallel port driver ...
- #modprobe vm...
+ if [ \${vmware_kind} = "local" ]; then
+ # to be filled in via the stage1 configuration script
+ modprobe -qa vmmon vmnet vmblock 2>/dev/null || return 1
+ # most probably nobody wants to run the parallel port driver ...
+ #modprobe vm...
+ else
+ # load module manuall
+ vmware_kind_path=/opt/openslx/plugin-repo/vmware/\${vmware_kind}/
+ module_src_path=\${vmware_kind_path}/root/lib/vmware/modules/source
+ insmod \${module_src_path}/vmblock.o
+ insmod \${module_src_path}/vmmon.o
+ insmod \${module_src_path}/vmnet.o
+ fi
}
unload_modules() {
# to be filled with the proper list within via the stage1 configuration
@@ -131,8 +139,9 @@ sub fillRunlevelScript
log_daemon_msg "Stopping vmware background services ..." "vmware"
killall vmnet-netifup vmnet-natd vmnet-bridge vmware vmplayer \\
vmware-tray vmnet-dhcpd 2>/dev/null
- # wait for shutting down of interfaces
- usleep 50000
+ # wait for shutting down of interfaces. vmnet needs kinda
+ # long
+ usleep 500000
unload_modules
log_end_msg $?
;;
diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm
index c11994f1..cac593df 100644
--- a/os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm
@@ -48,10 +48,19 @@ sub fillRunlevelScript
# helper functions
load_modules() {
- # to be filled in via the stage1 configuration script
- modprobe -qa vmmon vmnet vmblock 2>/dev/null || return 1
- # most probably nobody wants to run the parallel port driver ...
- #modprobe vm...
+ if [ \${vmware_kind} = "local" ]; then
+ # to be filled in via the stage1 configuration script
+ modprobe -qa vmmon vmnet vmblock 2>/dev/null || return 1
+ # most probably nobody wants to run the parallel port driver ...
+ #modprobe vm...
+ else
+ # load module manuall
+ vmware_kind_path=/opt/openslx/plugin-repo/vmware/\${vmware_kind}/
+ module_src_path=\${vmware_kind_path}/root/lib/vmware/modules/source
+ insmod \${module_src_path}/vmblock.o
+ insmod \${module_src_path}/vmmon.o
+ insmod \${module_src_path}/vmnet.o
+ fi
}
unload_modules() {
# to be filled with the proper list within via the stage1 configuration
@@ -121,8 +130,9 @@ sub fillRunlevelScript
ebegin "Stopping vmware background services ..."
killall vmnet-netifup vmnet-natd vmnet-bridge vmware vmplayer \\
vmware-tray vmnet-dhcpd 2>/dev/null
- # wait for shutting down of interfaces
- usleep 50000
+ # wait for shutting down of interfaces. vmnet needs kinda
+ # long
+ usleep 500000
unload_modules
eend $?
}
diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm
index 7e09e3c9..08a64055 100644
--- a/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm
@@ -53,10 +53,19 @@ sub fillRunlevelScript
# helper functions
load_modules() {
- # to be filled in via the stage1 configuration script
- modprobe -qa vmmon vmnet vmblock 2>/dev/null || return 1
- # most probably nobody wants to run the parallel port driver ...
- #modprobe vm...
+ if [ \${vmware_kind} = "local" ]; then
+ # to be filled in via the stage1 configuration script
+ modprobe -qa vmmon vmnet vmblock 2>/dev/null || return 1
+ # most probably nobody wants to run the parallel port driver ...
+ #modprobe vm...
+ else
+ # load module manuall
+ vmware_kind_path=/opt/openslx/plugin-repo/vmware/\${vmware_kind}/
+ module_src_path=\${vmware_kind_path}/root/lib/vmware/modules/source
+ insmod \${module_src_path}/vmblock.o
+ insmod \${module_src_path}/vmmon.o
+ insmod \${module_src_path}/vmnet.o
+ fi
}
unload_modules() {
# to be filled with the proper list within via the stage1 configuration
@@ -133,8 +142,9 @@ sub fillRunlevelScript
echo -n "Stopping vmware background services ..."
killall vmnet-netifup vmnet-natd vmnet-bridge vmware vmplayer \\
vmware-tray vmnet-dhcpd 2>/dev/null
- # wait for shutting down of interfaces
- usleep 50000
+ # wait for shutting down of interfaces. vmnet needs kinda
+ # long
+ usleep 500000
unload_modules
rc_status -v
;;