summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins
diff options
context:
space:
mode:
authorDirk von Suchodoletz2010-02-17 23:15:33 +0100
committerDirk von Suchodoletz2010-02-17 23:15:33 +0100
commit74b4cedc02259b76e83645c10f9086cd96a8af97 (patch)
treee18e2046f0df9906294eb40084d522383fba7476 /os-plugins/plugins
parentSuSE 11.2 functions file ... (diff)
downloadcore-74b4cedc02259b76e83645c10f9086cd96a8af97.tar.gz
core-74b4cedc02259b76e83645c10f9086cd96a8af97.tar.xz
core-74b4cedc02259b76e83645c10f9086cd96a8af97.zip
Xserver, qemukvm plugin stuff ...
Diffstat (limited to 'os-plugins/plugins')
-rw-r--r--os-plugins/plugins/pvs/OpenSLX/OSPlugin/pvs.pm2
-rw-r--r--os-plugins/plugins/pvs/XX_pvs.sh20
-rw-r--r--os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm1
-rw-r--r--os-plugins/plugins/qemukvm/XX_qemukvm.sh2
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm1
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm40
-rw-r--r--os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm1
-rw-r--r--os-plugins/plugins/xserver/OpenSLX/Distro/Suse_11_2.pm53
8 files changed, 96 insertions, 24 deletions
diff --git a/os-plugins/plugins/pvs/OpenSLX/OSPlugin/pvs.pm b/os-plugins/plugins/pvs/OpenSLX/OSPlugin/pvs.pm
index 6a6c7a8e..d0a629e4 100644
--- a/os-plugins/plugins/pvs/OpenSLX/OSPlugin/pvs.pm
+++ b/os-plugins/plugins/pvs/OpenSLX/OSPlugin/pvs.pm
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 - OpenSLX GmbH
+# Copyright (c) 2009..2010 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
diff --git a/os-plugins/plugins/pvs/XX_pvs.sh b/os-plugins/plugins/pvs/XX_pvs.sh
index e96f5a63..9a86574f 100644
--- a/os-plugins/plugins/pvs/XX_pvs.sh
+++ b/os-plugins/plugins/pvs/XX_pvs.sh
@@ -1,5 +1,5 @@
-# Copyright (c) 2009 - RZ Uni Freiburg
-# Copyright (c) 2009 - OpenSLX GmbH
+# Copyright (c) 2009..2010 - RZ Uni Freiburg
+# Copyright (c) 2009..2010 - OpenSLX GmbH
#
# This program/file is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -21,20 +21,20 @@ if [ -e /initramfs/plugin-conf/pvs.conf ]; then
. /initramfs/plugin-conf/pvs.conf
if [ $pvs_active -ne 0 ]; then
[ $DEBUGLEVEL -gt 0 ] && echo "executing the 'pvs' os-plugin ...";
- # configure central pvs client configuration file
- testmkdi /mnt/etc/pvs
+ # location of central pvs configuration files
+ testmkdi /mnt/etc/openslx/pvs
# add it to the Xserver script (?)
# link the executables
- for tool in poolVS poolVSClient VNCwrapper ; do
- ln -s /opt/openslx/plugin-repo/pvs/${tool} /mnt/var/X11R6/bin/${tool}
- done
+ #for tool in poolVS poolVSClient VNCwrapper ; do
+ # ln -s /opt/openslx/plugin-repo/pvs/${tool} /mnt/var/X11R6/bin/${tool}
+ #done
# write config file
- echo "# parameters generated by $0" > /mnt/etc/pvs/pvs.conf
- echo "pvs_PARAMS=\"$PARAMS\"" >> /mnt/etc/pvs/pvs.conf
- echo "pvs_X11=\"$pvs_X11\"" >> /mnt/etc/pvs/pvs.conf
+ #echo "# parameters generated by $0" > /mnt/etc/pvs/pvs.conf
+ #echo "pvs_PARAMS=\"$PARAMS\"" >> /mnt/etc/pvs/pvs.conf
+ #echo "pvs_X11=\"$pvs_X11\"" >> /mnt/etc/pvs/pvs.conf
[ $DEBUGLEVEL -gt 0 ] && echo "done with 'pvs' os-plugin ...";
diff --git a/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm b/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm
index 9b6fffd2..0f85aaa6 100644
--- a/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm
+++ b/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm
@@ -133,6 +133,7 @@ sub installationPhase
chmod 0755, "$self->{pluginRepositoryPath}/qemu-ifdown";
my $initFile = newInitFile();
+ $initfile->setName("qemukvm");
$initFile->setDesc("Setup environment for QEMU/KVM");
$initFile->addToBlock('head','. /etc/opt/openslx/network.qemukvm');
diff --git a/os-plugins/plugins/qemukvm/XX_qemukvm.sh b/os-plugins/plugins/qemukvm/XX_qemukvm.sh
index 49dc165b..7dcaa254 100644
--- a/os-plugins/plugins/qemukvm/XX_qemukvm.sh
+++ b/os-plugins/plugins/qemukvm/XX_qemukvm.sh
@@ -74,7 +74,7 @@ CPU." nonfatal
else
error " * All module loading failed including the kqemu module, which \
was either\n not found or couldn't be loaded for other reasons. Thus using \
-qemu(-kvm)\n makes not much sense."
+qemu(-kvm)\n makes not much sense." nonfatal
exit 1
fi
# load the tunnel device module
diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm
index faa41b97..d59227ad 100644
--- a/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm
@@ -44,5 +44,4 @@ sub initialize
return 1;
}
-
1;
diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
index 8cf1c7ab..eb0b835a 100644
--- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
@@ -256,7 +256,6 @@ sub preInstallationPhase()
}
}
-
sub installationPhase
{
my $self = shift;
@@ -433,25 +432,46 @@ sub _writeRunlevelScript
"unload_modules",
"rmmod $modlist 2>/dev/null"
);
- # vmnet interface definition
+ # vmnet0,1,8 (bridge, nat, host-only) interface definition
+ $script = unshiftHereDoc(<<" End-of-Here");
+ # let point the path directly to the directory where the binary lives
+ location=$vmpath
+ 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
if [ -n "\$vmnet1" ] ; then
- # the path might be directly point to the plugin dir
- location=$vmpath
\$location/usr/bin/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
- echo "1" > /proc/sys/net/ipv4/conf/vmnet1/forwarding 2>/dev/null
- echo "1" > /proc/sys/net/ipv4/conf/br0/forwarding 2>/dev/null
+ echo "1" >/proc/sys/net/ipv4/conf/vmnet1/forwarding 2>/dev/null
+ echo "1" >/proc/sys/net/ipv4/conf/br0/forwarding 2>/dev/null
#iptables -A -s vmnet1 -d br0
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
+ /opt/openslx/uclib-rootfs/usr/sbin/udhcpd \\
+ -S /etc/vmware/udhcpd-vmnet1.conf/udhcpd.conf
fi
+ if [ -n "\$vmnet8" ] ; then
+ $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
+ /opt/openslx/uclib-rootfs/usr/sbin/udhcpd \\
+ -S /etc/vmware/udhcpd-vmnet8.conf/udhcpd.conf
+ fi
+ }
End-of-Here
$initfile->addFunction(
"vmnetif",
@@ -489,7 +509,7 @@ sub _writeRunlevelScript
);
$initfile->addToCase(
'restart',
- 'stop && start'
+ '$0 stop && $0 start'
);
my $distro = (split('-',$self->{'os-plugin-engine'}->distroName()))[0];
diff --git a/os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm b/os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm
index 4cb7804b..61372d54 100644
--- a/os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm
+++ b/os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm
@@ -356,7 +356,6 @@ sub installAtiOldStyle
}
rmtree("$repopath/ati/temp");
-
}
1;
diff --git a/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_11_2.pm b/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_11_2.pm
new file mode 100644
index 00000000..ee78c40e
--- /dev/null
+++ b/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_11_2.pm
@@ -0,0 +1,53 @@
+# Copyright (c) 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/
+# -----------------------------------------------------------------------------
+# xserver/OpenSLX/Distro/Suse.pm
+# - provides SUSE-specific overrides of the Distro API for the xserver
+# plugin.
+# -----------------------------------------------------------------------------
+package xserver::OpenSLX::Distro::Suse;
+
+use strict;
+use warnings;
+
+use base qw(xserver::OpenSLX::Distro::Base);
+
+use File::Path;
+
+use OpenSLX::Basics;
+use OpenSLX::Utils;
+use OpenSLX::DistroUtils;
+
+use Data::Dumper;
+
+################################################################################
+### interface methods
+################################################################################
+
+sub setupXserverScript
+{
+ my $self = shift;
+ my $repoPath = shift;
+
+ my $script = $self->SUPER::setupXserverScript($repoPath);
+
+ $script .= unshiftHereDoc(<<' End-of-Here');
+ # SuSE specific extension to stage3 xserver.sh
+ testmkd /mnt/var/lib/xkb/compiled
+ testmkd /mnt/var/lib/X11
+ testmkd /mnt/var/lib/xdm/authdir/authfiles 0700
+ ln -s /usr/bin/Xorg /mnt/var/lib/X11/X
+ rm /mnt/etc/X11/xdm/SuSEconfig.xdm
+ End-of-Here
+
+ return $script;
+}
+
+1;