diff options
author | Bastian Wissler | 2009-05-14 19:27:12 +0200 |
---|---|---|
committer | Bastian Wissler | 2009-05-14 19:27:12 +0200 |
commit | 641917d1f5eae763fbb6cffe4b583c2dd06d7d5e (patch) | |
tree | 68cbdf42e9f3814f95635e51b0c44ed5737f34b8 /os-plugins/plugins/xserver/OpenSLX/OSPlugin | |
parent | status in wlanboot plugin and typo in suse-11.1 installation (diff) | |
download | core-641917d1f5eae763fbb6cffe4b583c2dd06d7d5e.tar.gz core-641917d1f5eae763fbb6cffe4b583c2dd06d7d5e.tar.xz core-641917d1f5eae763fbb6cffe4b583c2dd06d7d5e.zip |
xserver plugin (some severe changes):
* Suse-11.x driver installation supported by perl module in Distro
* Ubuntu-9.04 tested with recent scripts (ubuntu-8.10-gfx-install.sh)
* this version does NOT (yet) support < suse-11.0, < ubuntu-8.04
-> below suse-11.0 is only not tested
* we use driver packages just for ati drivers on SuSE-11.0 and greater
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2856 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/xserver/OpenSLX/OSPlugin')
-rw-r--r-- | os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm | 103 |
1 files changed, 50 insertions, 53 deletions
diff --git a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm index b21d579a..0191852a 100644 --- a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm +++ b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm @@ -243,45 +243,34 @@ sub installationPhase $self->removeLinks(); if ($attrs->{'xserver::nvidia'} == 1 || $attrs->{'xserver::ati'} == 1 ) { - copyFile("$pluginFilesPath/ubuntu-gfx-install.sh", "$installationPath"); - copyFile("$pluginFilesPath/suse-gfx-install.sh", "$installationPath"); - copyFile("$pluginFilesPath/ubuntu-8.10-gfx-install.sh", "$installationPath"); - + if($vendorOSName =~ /.*?ubuntu.*?/i) + { + if($vendorOSName =~ /.*?8.10|9.04|9.10.*?/i) + { + copyFile("$pluginFilesPath/ubuntu-8.10-gfx-install.sh", + "$installationPath"); + rename("$installationPath/ubuntu-8.10-gfx-install.sh", + "$installationPath/ubuntu-gfx-install.sh"); + } + else + { + copyFile("$pluginFilesPath/ubuntu-gfx-install.sh", "$installationPath"); + } + } $binDrivers = 1; } - if ($attrs->{'xserver::ati'} == 1) { - copyFile("$pluginFilesPath/ati-install.sh", "$installationPath"); - system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/ati-install.sh $vendorOSName"); + if ($attrs->{'xserver::ati'} == 1 ) { + $self->{distro}->installAti($pluginRepoPath,"packages"); } - if ($attrs->{'xserver::nvidia'} == 1) { - copyFile("$pluginFilesPath/nvidia-install.sh", "$installationPath"); - system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/nvidia-install.sh $vendorOSName"); + if ($attrs->{'xserver::nvidia'} == 1 ) { + $self->{distro}->installNvidia($pluginRepoPath,"packages"); } - - if ($binDrivers == 1) { $self->ldconf($info); - `chmod -R 755 $installationPath` + system("chmod -R 755 $installationPath"); } - # Some plugins have to copy files from their plugin folder into the - # vendor-OS. Here's an example for how to do that: - # - # # get our own name: - # my $pluginName = $self->{'name'}; - # - # # get our own base path: - # my $pluginBasePath = "$openslxBasePath/lib/plugins/$pluginName"; - # - # # copy all needed files now: - # foreach my $file ( qw( file1, file2 ) ) { - # copyFile("$pluginBasePath/$file", "$pluginRepoPath/"); - # } - - # name of current os - # my $vendorOSName = $self->{'os-plugin-engine'}->{'vendor-os-name'} - return; } @@ -321,32 +310,37 @@ sub ldconf my $ldincl = $info->{'plugin-repo-path'}.'/'; my $ldpl = "/etc/ld.conf.preload"; my $ldconf = "/etc/ld.so.conf"; + my $ldcache = ""; - ## WRITE ld.so.conf for different GL-implementations ## - - open(IN,'>'.$ldincl.'nvidia/ld.so.conf'); - print IN $ldincl."nvidia/usr/lib\n".$ldincl.'nvidia/usr/X11R6/lib'; - close(IN); - open(IN,'>'.$ldincl.'ati/ld.so.conf'); - print IN $ldincl."ati/usr/lib\n".$ldincl.'ati/usr/X11R6/lib'; - close(IN); - - + if( -d $ldincl.'nvidia/') { - ## CREATE TWO DIFFERENT 'ld.so.cache's ## - - my $ldcache = $ldincl.'/nvidia/ld.so.cache'; - system('sed -e "1s,^,include '.$ldincl.'nvidia/ld.so.conf\n,g" -i '.$ldconf); - #print "Calling ldconfig to create $ldcache ... Please Wait\n"; - system('ldconfig -C '.$ldcache); - system('sed -e "1d" -i '.$ldconf); + ## WRITE ld.so.conf ## + + open(IN,'>'.$ldincl.'nvidia/ld.so.conf'); + print IN $ldincl."nvidia/usr/lib\n".$ldincl.'nvidia/usr/X11R6/lib'; + close(IN); + + ## CREATE DIFFERENT 'ld.so.cache' ## + + $ldcache = $ldincl.'/nvidia/ld.so.cache'; + system('sed -e "1s,^,include '.$ldincl.'nvidia/ld.so.conf\n,g" -i '.$ldconf); + #print "Calling ldconfig to create $ldcache ... Please Wait\n"; + system('ldconfig -C '.$ldcache); + system('sed -e "1d" -i '.$ldconf); + } - $ldcache = $ldincl.'/ati/ld.so.cache'; - system('sed -e "1s,^,include '.$ldincl.'ati/ld.so.conf\n,g" -i '.$ldconf); - #print "Calling ldconfig to create $ldcache ... Please Wait\n"; - system('ldconfig -C '.$ldcache); - system('sed -e "1d" -i '.$ldconf); + if( -d $ldincl.'ati/') { + open(IN,'>'.$ldincl.'ati/ld.so.conf'); + print IN $ldincl."ati/usr/lib\n".$ldincl.'ati/usr/X11R6/lib'; + close(IN); + + $ldcache = $ldincl.'/ati/ld.so.cache'; + system('sed -e "1s,^,include '.$ldincl.'ati/ld.so.conf\n,g" -i '.$ldconf); + #print "Calling ldconfig to create $ldcache ... Please Wait\n"; + system('ldconfig -C '.$ldcache); + system('sed -e "1d" -i '.$ldconf); + } } @@ -354,7 +348,10 @@ sub ldconf # removes linked libraries from /usr/lib/ sub removeLinks { - my $instFolders = "/usr/lib /usr/X11R6/lib"; + my $instFolders = "/usr/lib"; + if(-d "/usr/X11R6/lib") { + $instFolders .= "/usr/X11R6/lib"; + } my $divertFolder = "/var/X11R6/lib"; my $pluginFolder = "/opt/openslx/plugin-repo/xserver"; |