From 0415de78841dea074c77d02d072a9ab9b2009e3e Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Mon, 11 Aug 2008 22:43:50 +0000 Subject: Minor improvement to r2028 (but a perl error remains) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2029 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../plugins/xserver/OpenSLX/Distro/Suse_10_2.pm | 59 ++++++++++++++++++++++ os-plugins/plugins/xserver/XX_xserver.sh | 20 ++++---- 2 files changed, 69 insertions(+), 10 deletions(-) create mode 100644 os-plugins/plugins/xserver/OpenSLX/Distro/Suse_10_2.pm (limited to 'os-plugins') diff --git a/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_10_2.pm b/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_10_2.pm new file mode 100644 index 00000000..80069c13 --- /dev/null +++ b/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_10_2.pm @@ -0,0 +1,59 @@ +# 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/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; + +################################################################################ +### 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/X11R6/bin + ln -s /usr/bin/Xorg /mnt/var/X11R6/bin/X + # relevant for older xservers only: check for kind of xorg module used + # and patch the i8,9XX VGA BIOS if needed + #if strinfile '"i810"' $xfc && [ -f /etc/hwinfo.display ] ; then + # highres=$(sort -run /etc/hwinfo.display|grep -i x -m 1) + # 915resolution -l|sed -n "s/Mode //;/32 bits/p" > /tmp/915res + # strinfile ${highres} /tmp/915res || { + # 915resolution $(grep -i x -m 1 /tmp/915res|sed "s/\ :.*//") $(echo \ + # $highres|sed "s/x/\ /") 2>&1 >/dev/null; + # # for some reason the above does not work for a Dell laptop with Intel + # # 855 chipset, so add another mode too + # 915resolution 3c $(echo $highres|sed "s/x/\ /") 2>&1 >/dev/null; } + #fi + End-of-Here + + return $script; +} + +1; diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh index 4bd33610..d607321b 100644 --- a/os-plugins/plugins/xserver/XX_xserver.sh +++ b/os-plugins/plugins/xserver/XX_xserver.sh @@ -107,10 +107,10 @@ EndSection Section "Monitor" Identifier "Generic Display" Option "DPMS" -# Horizsync could be enabled via xserver::ddcinfo attribute +# Modelname "could be enabled via xserver::ddcinfo attribute" # Vertrefresh ... +# Horizsync ... # DisplaySize ... -# Model ... EndSection Section "Screen" Identifier "Default Screen" @@ -160,28 +160,28 @@ a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents" }' -i $xfc fi [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ..."; - # run distro specific generated stage3 script - [ -e /mnt/opt/openslx/plugin-repo/xserver/xserver.sh ] && \ - . /mnt/opt/openslx/plugin-repo/xserver/xserver.sh + # some configurations produce no proper screen resolution without + # Horizsync and Vertrefresh set (more enhancements might be needed for + # really old displays like CRTs) if [ $xserver_ddcinfo -ne 0 ] ; then # read /etc/hwinfo.display started at "runinithook '00-started'" - # and add - # Horizsync M-N - # Vertrefresh O-P in Monitor section vert=$(grep -m 1 "Vert.*Range:" /etc/hwinfo.display | \ sed 's|.*Range:\ ||;s|\ Hz||') horz=$(grep -m 1 "Hor.*Range:" /etc/hwinfo.display | \ sed 's|.*Range:\ ||;s|\ kHz||') modl=$(grep -m 1 " Model: " /etc/hwinfo.display | \ sed 's|.*Model:\ ||;s|"||g') - size="0 0" size="$(grep -m 1 " Size: " /etc/hwinfo.display | \ sed 's|.*ize:\ ||;s|\ mm||;s|x|\ |')" [ -n "$vert" -a -n "$horz" ] && \ sed -e "s|# Horizsync.*| Horizsync $horz|;\ s|# Vertrefre.*| Vertrefresh $vert|;\ - s|# DisplaySi.*| DisplaySize $size|;\ s|# Modelname.*| Modelname \"$modl\"|" -i $xfc + [ -n "$size" ] && \ + sed -e "s|# DisplaySi.*| DisplaySize $size|" -i $xfc + # run distro specific generated stage3 script + [ -e /mnt/opt/openslx/plugin-repo/xserver/xserver.sh ] && \ + . /mnt/opt/openslx/plugin-repo/xserver/xserver.sh fi fi fi -- cgit v1.2.3-55-g7522