summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-09-23 14:14:44 +0000
committerThierry Vignaud <tv@mandriva.org>2009-09-23 14:14:44 +0000
commit9600ff32d386b3f8a3fe7628afc2019d8bc6f36c (patch)
tree0ab5b00478c1c7645cc487cbb9c4850c3fa8e8f6
parentb1190107cf3abb2a71aa0d319fcfcf607865695d (diff)
downloaddrakx-kbd-mouse-x11-9600ff32d386b3f8a3fe7628afc2019d8bc6f36c.tar
drakx-kbd-mouse-x11-9600ff32d386b3f8a3fe7628afc2019d8bc6f36c.tar.gz
drakx-kbd-mouse-x11-9600ff32d386b3f8a3fe7628afc2019d8bc6f36c.tar.bz2
drakx-kbd-mouse-x11-9600ff32d386b3f8a3fe7628afc2019d8bc6f36c.tar.xz
drakx-kbd-mouse-x11-9600ff32d386b3f8a3fe7628afc2019d8bc6f36c.zip
(libgl_config_and_more) make it more readable
-rw-r--r--lib/Xconfig/card.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm
index f8bfdb3..924110f 100644
--- a/lib/Xconfig/card.pm
+++ b/lib/Xconfig/card.pm
@@ -363,10 +363,12 @@ sub libgl_config_and_more {
#- ensure old deprecated conf files are not there anymore
unlink("/etc/ld.so.conf.d/$_.conf") foreach 'nvidia', 'nvidia_legacy', 'ati';
- my $wanted = $card->{Driver} eq 'fglrx' ? "/etc/ld.so.conf.d/GL/ati$card->{DriverVersion}.conf" :
- $card->{Driver} eq 'nvidia' ? "/etc/nvidia$card->{DriverVersion}/ld.so.conf" :
- $card->{Driver} eq 'psb' ? "/etc/ld.so.conf.d/GL/libdrm-psb.conf" :
- '/etc/ld.so.conf.d/GL/standard.conf';
+ my %files = (
+ fglrx => "/etc/ld.so.conf.d/GL/ati$card->{DriverVersion}.conf",
+ nvidia => "/etc/nvidia$card->{DriverVersion}/ld.so.conf",
+ psb => "/etc/ld.so.conf.d/GL/libdrm-psb.conf",
+ );
+ my $wanted = $files{$card->{Driver}} || '/etc/ld.so.conf.d/GL/standard.conf';
my $link = "$::prefix/etc/alternatives/gl_conf";
my $need_run_ldconfig = readlink($link) ne $wanted;
-e "$::prefix$wanted" or log::l("ERROR: $wanted does not exist, linking $link to it anyway");