summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-27 10:53:37 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-27 10:53:37 +0000
commitbffc9aff55b1df3475824bb618a245c74c188445 (patch)
treee0761feb614e09c3f5b00ee21881f2413f5c0c0c /perl-install
parentd4b794c691af933fbbd879cfd72b44955f356485 (diff)
downloaddrakx-bffc9aff55b1df3475824bb618a245c74c188445.tar
drakx-bffc9aff55b1df3475824bb618a245c74c188445.tar.gz
drakx-bffc9aff55b1df3475824bb618a245c74c188445.tar.bz2
drakx-bffc9aff55b1df3475824bb618a245c74c188445.tar.xz
drakx-bffc9aff55b1df3475824bb618a245c74c188445.zip
(switch_x_driver) explain why we switch driver in explanations
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rwxr-xr-xperl-install/standalone/service_harddrake9
2 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index dec14ddf9..eafe0d804 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,4 +1,5 @@
- service_harddrake:
+ o explain why we switch driver in explanations
o reconfigure X11 driver if current X11 driver is neither one of currently
supported driver for the card, nor a legacy driver ('fbdev' or 'vesa')
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 59e366296..b441eb662 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -75,10 +75,10 @@ sub schedule_warn_about_switch() {
}
sub switch_x_driver {
- my ($old_driver, $new_driver) = @_;
+ my ($old_driver, $new_driver, $reason) = @_;
cp_af('/etc/X11/xorg.conf', "/etc/X11/xorg.conf.mdv$^T");
substInFile { s!Driver "($old_driver)"!Driver "$new_driver"!g } '/etc/X11/xorg.conf';
- log::explanations("switch X.org driver from $old_driver to $new_driver");
+ log::explanations("switch X.org driver from $old_driver to $new_driver ($reason)");
Xconfig::card::libgl_config_and_more({ Driver => $new_driver });
}
@@ -104,7 +104,7 @@ foreach my $card (@cards) {
my $current_driver = get_xorg_driver();
if (!member($current_driver, $card_data->{Driver}, $card_data->{Driver2}, 'fbdev', 'vesa')) {
- switch_x_driver($current_driver, $card_data->{Driver});
+ switch_x_driver($current_driver, $card_data->{Driver}, 'no more supported by this driver');
schedule_warn_about_switch() if $current_driver =~ $card->{xorg_driver_regexp};
next;
}
@@ -125,7 +125,8 @@ foreach my $card (@cards) {
my $driver = $cards[0]{Driver};
my $old_driver = $1 if cat_('/etc/X11/xorg.conf') =~ /Driver "($card->{xorg_driver_regexp})"/;
if ($old_driver) {
- switch_x_driver($card->{xorg_driver_regexp}, $driver);
+ switch_x_driver($card->{xorg_driver_regexp}, $driver,
+ 'proprietary driver not found for current driver');
schedule_warn_about_switch();
}
}