From f435a9a2c5d31d71403767b23757aaecd449ae68 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Tue, 9 Mar 2010 21:27:15 +0100 Subject: Rearranging stuff for new Ubuntu ... Problem with init-hook (unneeded for 10.04) ... --- .../plugins/xserver/OpenSLX/Distro/Ubuntu.pm | 22 +++++- .../plugins/xserver/OpenSLX/Distro/Ubuntu_10.pm | 91 ---------------------- .../xserver/init-hooks/00-started/xserver.sh | 6 +- 3 files changed, 26 insertions(+), 93 deletions(-) delete mode 100644 os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu_10.pm (limited to 'os-plugins') diff --git a/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm b/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm index a1dda709..728e6a03 100644 --- a/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm +++ b/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm @@ -1,4 +1,4 @@ -# Copyright (c) 2008 - OpenSLX GmbH +# Copyright (c) 2008..2010 - OpenSLX GmbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -26,6 +26,21 @@ 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; @@ -38,6 +53,11 @@ sub setupXserverScript testmkd /mnt/var/run/xauth testmkd /mnt/var/lib/xkb ln -sf /usr/bin/Xorg /mnt/etc/X11/X + # newer Xorgs do not need predefined configuration file, not needed if + # XserverPathInfo gets implemented ... + sed -e "1i# xorg.conf not needed in most cases for Xorg 1.7+" \ + /mnt/etc/X11/xorg.conf >/etc/X11/xorg.openslx 2>/dev/null + rm /mnt/etc/X11/xorg.conf 2>/dev/null End-of-Here return $script; diff --git a/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu_10.pm b/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu_10.pm deleted file mode 100644 index 65470392..00000000 --- a/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu_10.pm +++ /dev/null @@ -1,91 +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/ -# ----------------------------------------------------------------------------- -# xserver/OpenSLX/Distro/Ubuntu.pm -# - provides Ubuntu-specific overrides of the distro API for the xserver -# plugin. -# ----------------------------------------------------------------------------- -package xserver::OpenSLX::Distro::Ubuntu_10; - -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); - - $script .= unshiftHereDoc(<<' End-of-Here'); - # Ubuntu specific extension to stage3 xserver.sh - testmkd /mnt/var/run/xauth - testmkd /mnt/var/lib/xkb - ln -sf /usr/bin/Xorg /mnt/etc/X11/X - # newer Xorgs do not need predefined configuration file, not needed if - # XserverPathInfo gets implemented ... - sed -e "1i# xorg.conf not needed in most cases for Xorg 1.7+" \ - /mnt/etc/X11/xorg.conf >/etc/X11/xorg.openslx 2>/dev/null - rm /mnt/etc/X11/xorg.conf 2>/dev/null - 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; diff --git a/os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh b/os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh index 71d185e0..f9c3e7a7 100644 --- a/os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh +++ b/os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh @@ -19,6 +19,11 @@ # automatic Xorg configation fails in this field. If no useable info was # detected just delete the file. +# not really needed for ubuntu 10.04 +# ToDo: fix so it is not installed by default +#echo ${slx_distro_name}${slx_distro_ver}>/tmp/utest +#[ ${slx_distro_name} = "ubuntu" ] && [ ${slx_distro_ver} = "10.04" ] && exit 0 + # tablet detection function tabletdetect () { sleep 1; waitfor /etc/hwinfo.bios 20000 @@ -39,4 +44,3 @@ tabletdetect () { ( hwinfo --monitor >/etc/hwinfo.display; grep "Generic Monitor" \ /etc/hwinfo.display >/dev/null 2>&1 && rm /etc/hwinfo.display ) & ( tabletdetect ) & - -- cgit v1.2.3-55-g7522