From 7d5cae86ad50848e4558f207f7c1c5a2830948f3 Mon Sep 17 00:00:00 2001 From: Bastian Wissler Date: Tue, 25 Aug 2009 14:34:29 +0000 Subject: Fix for suse local kernel version mismatch -> fglrx.ko gets correctly downloaded for some other local version (it works) if there is no fglrx.ko for the needed kernel version git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3131 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm') diff --git a/os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm b/os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm index 89532e4f..1ad6f163 100644 --- a/os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm +++ b/os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm @@ -178,6 +178,18 @@ sub installAti my $url2 = `zcat $tmpdir/primary.xml.gz | grep -P -o "$chost/ati-fglrxG01-kmp-$ksuffix.*?$kver_ati.*?$chost.rpm"`; chomp($url2); + + if($url2 eq '') { + # Taking more general kernel version (minus local suse version) + my $newkernvers = substr $kver_ati, 0, -4; + print "RPM name is empty - taking kernel version $newkernvers!\n"; + $url2 = `zcat $tmpdir/primary.xml.gz | grep -P -o "$chost/ati-fglrxG01-kmp-$ksuffix.*?$newkernvers.*?$chost.rpm"`; + chomp($url2); + if(! $url2 eq '') { + $kver = $newkernvers; + } + } + system("wget -P $tmpdir -t2 -T2 $url/$url2 >/dev/null 2>&1"); my @rpm = glob "$tmpdir/ati-fglrxG01-kmp-$ksuffix*$chost.rpm"; @@ -196,7 +208,7 @@ sub installAti { mkdir("$repopath/ati/modules/"); } - copyFile("$tmpdir/lib/modules/$kver-$ksuffix/updates/fglrx.ko", + copyFile("$tmpdir/lib/modules/$kver*-$ksuffix/updates/fglrx.ko", "$repopath/ati/modules"); my @versions = split(/-/, $rpm[0]); -- cgit v1.2.3-55-g7522