summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-06-09 09:47:35 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-06-09 09:47:35 +0000
commit7bb6fd37e593001b63292c16d68d2d8a2f219bd8 (patch)
tree67174ceb10668e7bfadf0e24e0e95c49da125a9f /perl-install
parenteef3120c268ba7e603e069e483ad41987ed1fd2f (diff)
downloaddrakx-backup-do-not-use-7bb6fd37e593001b63292c16d68d2d8a2f219bd8.tar
drakx-backup-do-not-use-7bb6fd37e593001b63292c16d68d2d8a2f219bd8.tar.gz
drakx-backup-do-not-use-7bb6fd37e593001b63292c16d68d2d8a2f219bd8.tar.bz2
drakx-backup-do-not-use-7bb6fd37e593001b63292c16d68d2d8a2f219bd8.tar.xz
drakx-backup-do-not-use-7bb6fd37e593001b63292c16d68d2d8a2f219bd8.zip
forward: ensure that explanations go into /var/log/explanations is standalone
mode (log::explanations() just calls log::l() at install time)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/card.pm17
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 63a60f8e7..766327b20 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -457,12 +457,21 @@ sub libgl_config {
nvidia => '.conf.nvidia',
fglrx => '.conf.ati',
);
+ my $need_to_run_ldconfig;
+ my $link = "$dir/GL.conf";
if (my $file = $driver_to_libgl_config{$Driver}) {
- symlinkf($file, "$dir/GL.conf") if -e "$dir/$file";
- } else {
- eval { rm_rf("$dir/GL.conf") };
+ if (-e "$dir/$file" && readlink($link) ne $file) {
+ symlinkf($file, "$dir/GL.conf");
+ $need_to_run_ldconfig = 1;
+ log::explanations("ldconfig will be run because the GL library was enabled");
+ }
+ } elsif (-e $link) {
+ eval { rm_rf($link) };
+ $need_to_run_ldconfig = 2;
+ log::explanations("ldconfig will be run because the GL library was disabled");
+
}
- system("/sbin/ldconfig") if $::isStandalone;
+ system("/sbin/ldconfig") if $::isStandalone && $need_to_run_ldconfig;
}
sub add_to_card__using_Cards {