From 6e9a6753e516d8c9329bc63d39a1d89b7c58f111 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 29 Oct 2009 17:14:03 +0000 Subject: (schedule_warn_about_switch,notify-x11-free-driver-switch) explain why xorg driver was reconfigured --- perl-install/standalone/service_harddrake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'perl-install/standalone/service_harddrake') 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); } } } -- cgit v1.2.1