summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-16 12:21:56 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-16 12:21:56 +0000
commit6529d4eac31f3230501e18cc93add6fb1a597399 (patch)
tree9ec5efb357d25bd98b89b0f4d1d0eb63f7fd3061
parent816a1aaff387eeac72b28932127cf00886d23fea (diff)
downloaddrakx-6529d4eac31f3230501e18cc93add6fb1a597399.tar
drakx-6529d4eac31f3230501e18cc93add6fb1a597399.tar.gz
drakx-6529d4eac31f3230501e18cc93add6fb1a597399.tar.bz2
drakx-6529d4eac31f3230501e18cc93add6fb1a597399.tar.xz
drakx-6529d4eac31f3230501e18cc93add6fb1a597399.zip
do not backup xorg.conf if we won't change the driver
-rw-r--r--perl-install/NEWS2
-rwxr-xr-xperl-install/standalone/service_harddrake7
2 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 0ed09f69a..967f4bc8d 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -3,6 +3,8 @@
- libDrakX:
o share infrastructure so that rpmdrake can get rid of some gray
windows
+- harddrake service:
+ o do not backup xorg.conf if we won't change the driver
Version 11.67 - 2 October 2008
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 8a91146ef..ce7a98fbb 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -88,10 +88,11 @@ foreach my $card (@cards) {
require Xconfig::card;
my @cards = Xconfig::card::probe();
my $driver = $cards[0]{Driver};
- my $new_driver;
- cp_af('/etc/X11/xorg.conf', "/etc/X11/xorg.conf.mdv$^T");
- substInFile { $new_driver = $1 if s!Driver "($card->{xorg_driver_regexp})"!Driver "$driver"!g } '/etc/X11/xorg.conf';
+ my $new_driver = $1 if cat_('/etc/X11/xorg.conf') =~ /Driver "($card->{xorg_driver_regexp})/;
if ($new_driver) {
+ cp_af('/etc/X11/xorg.conf', "/etc/X11/xorg.conf.mdv$^T");
+ substInFile { s!Driver "($card->{xorg_driver_regexp})"!Driver "$driver"!g } '/etc/X11/xorg.conf';
+ touch('/var/run/harddrake_swithed_to_free_driver');
log::explanations("switch X.org driver from $new_driver to $driver");
touch('/var/run/harddrake-notify-x11-free-driver-switch');
Xconfig::card::libgl_config_and_more({ Driver => $driver });