summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-29 17:14:03 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-29 17:14:03 +0000
commit6e9a6753e516d8c9329bc63d39a1d89b7c58f111 (patch)
tree390e3aa7c151897b078462223ed20d3b7a7549ca
parentecb7350fb94a6386abb4975ed8e6d55805a27920 (diff)
downloaddrakx-6e9a6753e516d8c9329bc63d39a1d89b7c58f111.tar
drakx-6e9a6753e516d8c9329bc63d39a1d89b7c58f111.tar.gz
drakx-6e9a6753e516d8c9329bc63d39a1d89b7c58f111.tar.bz2
drakx-6e9a6753e516d8c9329bc63d39a1d89b7c58f111.tar.xz
drakx-6e9a6753e516d8c9329bc63d39a1d89b7c58f111.zip
(schedule_warn_about_switch,notify-x11-free-driver-switch) explain why
xorg driver was reconfigured
-rw-r--r--perl-install/NEWS3
-rwxr-xr-xperl-install/standalone/notify-x11-free-driver-switch9
-rwxr-xr-xperl-install/standalone/notify-x11-free-driver-switch.xsetup2
-rwxr-xr-xperl-install/standalone/service_harddrake11
4 files changed, 18 insertions, 7 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index fdb71a587..4327d284f 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,6 @@
+- notify-x11-free-driver-switch, service_harddrake:
+ o explain why xorg driver was reconfigured
+
Version 12.74.1 - 29 October 2009
- service_harddrake:
diff --git a/perl-install/standalone/notify-x11-free-driver-switch b/perl-install/standalone/notify-x11-free-driver-switch
index fd43416a1..1a7ecc1b5 100755
--- a/perl-install/standalone/notify-x11-free-driver-switch
+++ b/perl-install/standalone/notify-x11-free-driver-switch
@@ -12,5 +12,12 @@ my $driver = eval {
$raw_X->get_Driver;
} || N("unknown");
-$in->ask_warn(N("Warning"), N("The proprietary driver for your graphic card can not be found, the system is now using the free software driver (%s).", $driver));
+
+my $reason = cat_($ENV{LOCK});
+
+$in->ask_warn(N("Warning"),
+ join("\n\n",
+ N("The proprietary driver for your graphic card can not be found, the system is now using the free software driver (%s).", $driver),
+ if_($reason, N("Reason: %s", $reason)),
+ ));
unlink $0 if $0 =~ m!/etc/X11/xsetup.d/!;
diff --git a/perl-install/standalone/notify-x11-free-driver-switch.xsetup b/perl-install/standalone/notify-x11-free-driver-switch.xsetup
index b3a1d562d..9c6464242 100755
--- a/perl-install/standalone/notify-x11-free-driver-switch.xsetup
+++ b/perl-install/standalone/notify-x11-free-driver-switch.xsetup
@@ -2,7 +2,7 @@
# (c) 2005-2008 Mandriva SA
# to be sourced
-LOCK=/var/run/harddrake-notify-x11-free-driver-switch;
+export LOCK=/var/run/harddrake-notify-x11-free-driver-switch;
if [ -f $LOCK ]; then
/usr/share/harddrake/notify-x11-free-driver-switch
rm -f $LOCK;
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 1401b0cec..3acf5a000 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -73,9 +73,10 @@ sub get_xorg_driver() {
}
}
-sub schedule_warn_about_switch() {
- touch('/var/run/harddrake_swithed_to_free_driver');
- touch('/var/run/harddrake-notify-x11-free-driver-switch');
+sub schedule_warn_about_switch {
+ my ($reason) = @_;
+ output('/var/run/harddrake_swithed_to_free_driver', $reason);
+ output('/var/run/harddrake-notify-x11-free-driver-switch', $reason);
}
my $lib = arch() =~ /x86_64/ ? "lib64" : "lib";
@@ -137,7 +138,7 @@ foreach my $device (@devices) {
if (!member($current_driver, $card_data->{Driver}, $card_data->{Driver2}, 'fbdev', 'vesa')) {
my $reason = N("no more supported by this driver");
switch_x_driver($current_driver, $card_data->{Driver}, $reason);
- schedule_warn_about_switch() if any { $current_driver =~ $_->{xorg_driver_regexp} } @cards;
+ schedule_warn_about_switch($reason) if any { $current_driver =~ $_->{xorg_driver_regexp} } @cards;
next;
}
}
@@ -165,7 +166,7 @@ foreach my $card (@cards) {
if ($old_driver) {
my $reason = N("proprietary driver not found for current driver");
switch_x_driver($card->{xorg_driver_regexp}, $driver, $reason);
- schedule_warn_about_switch();
+ schedule_warn_about_switch($reason);
}
}
}