From 416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Thu, 2 Sep 2010 17:50:49 +0200 Subject: change dir structure --- .../plugins/xserver/OpenSLX/Distro/Ubuntu.pm | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm (limited to 'src/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm') diff --git a/src/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm b/src/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm new file mode 100644 index 00000000..057cf138 --- /dev/null +++ b/src/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm @@ -0,0 +1,96 @@ +# 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/ +# ----------------------------------------------------------------------------- +# xserver/OpenSLX/Distro/Ubuntu.pm +# - provides Ubuntu-specific overrides of the distro API for the xserver +# plugin. +# ----------------------------------------------------------------------------- +package xserver::OpenSLX::Distro::Ubuntu; + +use strict; +use warnings; + +use base qw(xserver::OpenSLX::Distro::Base); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +# needs to be implemented ... +sub XserverPathInfo +{ + my $self = shift; + + my $pathInfo = { + config => '/etc/X11/xorg.openslx', + paths => [ + '/usr/bin', + ], + }; + + return $pathInfo; +} + +sub setupXserverScript +{ + my $self = shift; + my $repoPath = shift; + + my $script = $self->SUPER::setupXserverScript($repoPath); + + # overwriting script part from Base.pm + $script = unshiftHereDoc(<<' End-of-Here'); + # Ubuntu specific extension to stage3 xserver.sh + echo -e "# ${xfc#/mnt*}\n# autogenerated X hardware configuration by \ + the xserver plugin in OpenSLX stage3\n# DO NOT EDIT THIS FILE BUT THE PLUGIN \ + INSTEAD" >${xfc} + # using variables defined in XX_xserver.sh + echo -e "${x_modpath}\n${x_srvflags}\n${x_modules}" >>${xfc} + echo "${x_keyboard}" | sed "s/kbd/evdev/" >>${xfc} + echo -e "${x_mouse}\n${x_monitor}\n${x_screen}" >>${xfc} + echo "${x_srvlayout}" | sed "/ Screen /d" >>${xfc} + testmkd /mnt/etc/X11/xorg.conf.d + testmkd /mnt/var/run/xauth + testmkd /mnt/var/lib/xkb + ln -sf /usr/bin/Xorg /mnt/etc/X11/X + End-of-Here + + return $script; +} + + +sub installNvidia +{ + my $self = shift; + my $repopath = shift || "/opt/openslx/plugin-repo/xserver/"; + my $pkgpath = shift || "packages"; + + my $distroName = $self->{engine}->distroName(); + + system($repopath."/ubuntu-gfx-install.sh nvidia $distroName"); + +} + +sub installAti +{ + my $self = shift; + my $repopath = shift || "/opt/openslx/plugin-repo/xserver/"; + my $pkgpath = shift || "packages"; + + my $distroName = $self->{engine}->distroName(); + + system($repopath."/ubuntu-gfx-install.sh ati $distroName"); + +} + +1; -- cgit v1.2.3-55-g7522