diff options
author | Sebastian Schmelzer | 2010-09-02 17:50:49 +0200 |
---|---|---|
committer | Sebastian Schmelzer | 2010-09-02 17:50:49 +0200 |
commit | 416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5 (patch) | |
tree | 4715f7d742fec50931017f38fe6ff0a89d4ceccc /os-plugins/plugins/vmware/OpenSLX/Distro | |
parent | Fix for the problem reported on the list (sed filter forgotten for the (diff) | |
download | core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.tar.gz core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.tar.xz core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.zip |
change dir structure
Diffstat (limited to 'os-plugins/plugins/vmware/OpenSLX/Distro')
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm | 47 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm | 227 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/Distro/Fedora.pm | 29 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm | 28 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm | 28 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/Distro/Ubuntu.pm | 23 |
6 files changed, 0 insertions, 382 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm deleted file mode 100644 index d59227ad..00000000 --- a/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2008 - OpenSLX GmbH -# -# This program is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# vmware/OpenSLX/Distro/Base.pm -# - provides base implementation of the Distro API for the vmware plugin. -# ----------------------------------------------------------------------------- -package vmware::OpenSLX::Distro::Base; - -use strict; -use warnings; - -our $VERSION = 1.01; # API-version . implementation-version - -use Scalar::Util qw( weaken ); - -use OpenSLX::Basics; -use OpenSLX::Utils; - -################################################################################ -### interface methods -################################################################################ -sub new -{ - my $class = shift; - my $self = {}; - return bless $self, $class; - -} - -sub initialize -{ - my $self = shift; - my $engine = shift; - weaken($self->{engine}); - # avoid circular reference between plugin and its engine - - return 1; -} - -1; diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm deleted file mode 100644 index fb7b4998..00000000 --- a/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm +++ /dev/null @@ -1,227 +0,0 @@ -# Copyright (c) 2008 - OpenSLX GmbH -# -# This program is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# vmware/OpenSLX/Distro/debian.pm -# - provides Debian-specific overrides of the Distro API for the vmware -# plugin. -# ----------------------------------------------------------------------------- -package vmware::OpenSLX::Distro::Debian; - -use strict; -use warnings; - -use base qw(vmware::OpenSLX::Distro::Base); - -use OpenSLX::Basics; -use OpenSLX::Utils; - -################################################################################ -### interface methods -################################################################################ - -sub fillRunlevelScript -{ - my $self = shift; - my $location = shift; - my $kind = shift; - - my $script = unshiftHereDoc(<<" End-of-Here"); - #!/bin/sh - # Ubuntu/Debian specific start/stop script, generated via stage1 'vmware' - # plugin install - # inspiration taken from vmware start script: - # 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 - # Required-Start: \$syslog - # Required-Stop: - # Default-Start: 2 3 5 - # Default-Stop: 0 6 - # Short-Description: Manages the services needed to run VMware software - # Description: Manages the services needed to run VMware software - ### END INIT INFO - - load_modules() { - End-of-Here - - # Load modules - if ($kind eq 'local' || $kind eq 'local25' || $kind eq 'local30') { - if ($kind eq 'local30') { - $script .= unshiftHereDoc(<<" End-of-Here"); - # vmplayer 3.0 specific stuff - insmod /lib/modules/\$(uname -r)/misc/vsock.ko || return 1 - insmod /lib/modules/\$(uname -r)/misc/vmci.ko || return 1 - End-of-Here - } - $script .= unshiftHereDoc(<<" End-of-Here"); - # to be filled in via the stage1 configuration script - insmod /lib/modules/\$(uname -r)/misc/vmmon.ko || return 1 - insmod /lib/modules/\$(uname -r)/misc/vmnet.ko || return 1 - insmod /lib/modules/\$(uname -r)/misc/vmblock.o 2>/dev/null || return 0 - End-of-Here - } elsif ($kind eq 'vmpl1.0') { - $script .= unshiftHereDoc(<<" End-of-Here"); - vmware_kind_path=/opt/openslx/plugin-repo/vmware/${kind}/ - module_src_path=\${vmware_kind_path}/vmroot/modules - insmod \${module_src_path}/vmmon.ko - insmod \${module_src_path}/vmnet.ko - End-of-Here - } elsif ($kind eq "vmpl2.0") { - $script .= unshiftHereDoc(<<" End-of-Here"); - vmware_kind_path=/opt/openslx/plugin-repo/vmware/${kind}/ - module_src_path=\${vmware_kind_path}/vmroot/modules - insmod \${module_src_path}/vmmon.ko - insmod \${module_src_path}/vmnet.ko - insmod \${module_src_path}/vmblock.ko - End-of-Here - } elsif ($kind eq 'vmpl2.5') { - $script .= unshiftHereDoc(<<" End-of-Here"); - vmware_kind_path=/opt/openslx/plugin-repo/vmware/${kind}/ - module_src_path=\${vmware_kind_path}/vmroot/modules - insmod \${module_src_path}/vmmon.ko - insmod \${module_src_path}/vmnet.ko - insmod \${module_src_path}/vmblock.ko - End-of-Here - } elsif ($kind eq 'vmpl3.0') { - $script .= unshiftHereDoc(<<" End-of-Here"); - vmware_kind_path=/opt/openslx/plugin-repo/vmware/${kind}/ - module_src_path=\${vmware_kind_path}/vmroot/modules - insmod \${module_src_path}/vmmon.ko - insmod \${module_src_path}/vmnet.ko - insmod \${module_src_path}/vmblock.ko - insmod \${module_src_path}/vsock.ko - insmod \${module_src_path}/vmci.ko - End-of-Here - } - - # unload modules - $script .= unshiftHereDoc(<<" End-of-Here"); - } - - unload_modules() { - # to be filled with the proper list within via the stage1 - # configuration script - rmmod vmmon vmblock vmnet vmmon vmci vsock 2>/dev/null - } - End-of-Here - - # setup vmnet0 and vmnet8 - # depends on specific stage3 setting. I let this if in the code - # because else this whole if-reducing process will become more - # complicated and the code will get less understandable - $script .= unshiftHereDoc(<<" End-of-Here"); - # the bridged interface - setup_vmnet0() { - if [ -n "\$vmnet0" ] ; then - # the path might be directly point to the plugin dir - End-of-Here - if ($kind eq 'vmpl2.5' || $kind eq 'vmpl3.0' || $kind eq 'local25' || $kind eq 'local30') { - $script .= " $location/vmnet-bridge -d /var/run/vmnet-bridge-0.pid -n 0\n"; - } else { - $script .= " $location/vmnet-bridge -d /var/run/vmnet-bridge-0.pid /dev/vmnet0 eth0\n"; - } - $script .= unshiftHereDoc(<<" End-of-Here"); - fi - } - # we definately prefer the hostonly interface for NATed operation too - # distinction is made via enabled forwarding - setup_vmnet1() { - if [ -n "\$vmnet1" ] ; then - # the path might be directly point to the plugin dir - $location/vmnet-netifup -d /var/run/vmnet-netifup-vmnet1.pid \\ - /dev/vmnet1 vmnet1 - dhcpif="\$dhcpif vmnet1" - ip addr add \$vmnet1 dev vmnet1 - ip link set vmnet1 up - if [ -n "\$vmnet1nat" ] ; then - # needs refinement interface name for eth0 is known in stage3 already - echo "1" > /proc/sys/net/ipv4/conf/vmnet1/forwarding 2>/dev/null - echo "1" > /proc/sys/net/ipv4/conf/eth0/forwarding 2>/dev/null - #iptables -A -s vmnet1 -d eth0 - fi - $location/vmnet-dhcpd -cf /etc/vmware/dhcpd-vmnet1.conf -lf \\ - /var/run/vmware/dhcpd-vmnet1.leases \\ - -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1 2>/dev/null # or logfile - fi - } - # incomplete ... - setup_vmnet8() { - if [ -n "\$vmnet8" ] ; then - # we don't need the following test. It's handled by - # XX_vmware.sh - #test -c /dev/vmnet8 || mknod c 119 8 /dev/vmnet8 - $location/vmnet-netifup -d /var/run/vmnet-netifup-vmnet8.pid \\ - /dev/vmnet8 vmnet8 - ip addr add \$vmnet8 dev vmnet8 - ip link set vmnet8 up - # /etc/vmware/vmnet-natd-8.mac simply contains a mac like 00:50:56:F1:30:50 - $location/vmnet-natd -d /var/run/vmnet-natd-8.pid \\ - -m /etc/vmware/vmnet-natd-8.mac -c /etc/vmware/nat.conf 2>/dev/null # or logfile - $location/vmnet-dhcpd -cf /etc/vmware/dhcpd-vmnet8.conf \\ - -lf /var/run/vmware/dhcpd-vmnet8.leases \\ - -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8 2>/dev/null # or logfile - fi - } - # initialize the lsb status messages - . /lib/lsb/init-functions - - case \$1 in - start) - log_daemon_msg "Starting vmware background services ..." "vmware" - # include default directories - . /etc/opt/openslx/openslx.conf - # load the configuration file - . \${OPENSLX_DEFAULT_CONFDIR}/plugins/vmware/vmware.conf - mkdir -p /var/run/vmware - touch /var/run/vmware/dhcpd-vmnet1.leases - touch /var/run/vmware/dhcpd-vmnet8.leases - load_modules || log_warning_msg "The loading of vmware modules failed" - setup_vmnet0 || log_warning_msg "Problems setting up vmnet0 interface" - setup_vmnet1 || log_warning_msg "Problems setting up vmnet1 interface" - setup_vmnet8 || log_warning_msg "Problems setting up vmnet8 interface" - log_end_msg $? - ;; - stop) - # message output should match the given vendor-os - 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. vmnet needs kinda - # long - sleep 1 - unload_modules - log_end_msg $? - ;; - # we don't need a status yet... at least as long as it is - # unclear in which path the corresponding binary (see original - # /etc/init.d/vmware) is in our case - #status) - # log_daemon_msg "Say something useful here ..." - #;; - restart) - \$0 stop - \$0 start - exit $? - ;; - *) - log_success_msg "Usage: \$0 {start|stop|restart}" - exit 2 - ;; - esac - exit 0 - End-of-Here - return $script; -} - -1; diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Fedora.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Fedora.pm deleted file mode 100644 index 912bdfa0..00000000 --- a/os-plugins/plugins/vmware/OpenSLX/Distro/Fedora.pm +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2007..2010 - OpenSLX GmbH -# -# This program is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# vmware/OpenSLX/Distro/Fedora.pm -# - provides Fedora-specific overrides of the Distro API for the vmware -# plugin. -# ----------------------------------------------------------------------------- -package vmware::OpenSLX::Distro::Fedora; - -use strict; -use warnings; - -use base qw(vmware::OpenSLX::Distro::Base); - -use OpenSLX::Basics; - -################################################################################ -### interface methods -################################################################################ - - -1; diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm deleted file mode 100644 index 2e1197d8..00000000 --- a/os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2008 - OpenSLX GmbH -# -# This program is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# vmware/OpenSLX/Distro/Gentoo.pm -# - provides Gentoo-specific overrides of the Distro API for the vmware -# plugin. -# ----------------------------------------------------------------------------- -package vmware::OpenSLX::Distro::Gentoo; - -use strict; -use warnings; - -use base qw(vmware::OpenSLX::Distro::Base); - -use OpenSLX::Basics; - -################################################################################ -### interface methods -################################################################################ - -1; diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm deleted file mode 100644 index c1b2ecf4..00000000 --- a/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2008..2010 - OpenSLX GmbH -# -# This program is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# vmware/OpenSLX/Distro/Suse.pm -# - provides SUSE-specific overrides of the Distro API for the vmware plugin. -# ----------------------------------------------------------------------------- -package vmware::OpenSLX::Distro::Suse; - -use strict; -use warnings; - -use base qw(vmware::OpenSLX::Distro::Base); - -use OpenSLX::Basics; -use OpenSLX::Utils; - -################################################################################ -### interface methods -################################################################################ - -1; diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Ubuntu.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Ubuntu.pm deleted file mode 100644 index 922fb34f..00000000 --- a/os-plugins/plugins/vmware/OpenSLX/Distro/Ubuntu.pm +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2007..2010 - OpenSLX GmbH -# -# This program is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# vmware/OpenSLX/Distro/Ubuntu.pm -# - provides Ubuntu-specific overrides of the Distro API for the vmware -# plugin. -# ----------------------------------------------------------------------------- -package vmware::OpenSLX::Distro::Ubuntu; - -use strict; -use warnings; - -# inherit everything from Debian (as Ubuntu is based on it anyway) -use base qw(vmware::OpenSLX::Distro::Debian); - -1; |