diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-07-04 14:57:14 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-07-04 14:57:14 +0000 |
commit | 40372582729e6f8b4f246a61d31d5b4ad3d309da (patch) | |
tree | 7accf35f49e31ea2399594df6ac8c23886381692 /perl-install/standalone | |
parent | b7ab0d8a0e3c16bccf37cf62e8f9560fafc4749d (diff) | |
download | drakx-backup-do-not-use-40372582729e6f8b4f246a61d31d5b4ad3d309da.tar drakx-backup-do-not-use-40372582729e6f8b4f246a61d31d5b4ad3d309da.tar.gz drakx-backup-do-not-use-40372582729e6f8b4f246a61d31d5b4ad3d309da.tar.bz2 drakx-backup-do-not-use-40372582729e6f8b4f246a61d31d5b4ad3d309da.tar.xz drakx-backup-do-not-use-40372582729e6f8b4f246a61d31d5b4ad3d309da.zip |
only log "switch xorg driver" & do actual GL config if we do need it
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/service_harddrake | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index cbeafa0fb..781b87ee1 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -58,13 +58,17 @@ if (find { $_->{driver} =~ /Card:NVIDIA/ } detect_devices::probeall()) { # s!#*( Load.*glx)!\1!g; # } $_ foreach "/etc/X11/XF86Config-4", "/etc/X11/XF86Config"; } else { + my $done; substInFile { - log::explanations("switch X.org driver from nvidia to nv") if /Driver "nv.+"/; - s!Driver "nv.*"!Driver "nv"!g; + if (/Driver "nv.+"/) { + $done = 1; + log::explanations("switch X.org driver from nvidia to nv"); + s!Driver "nv.*"!Driver "nv"!g; + } } $_ foreach grep { -e $_ } "/etc/X11/XF86Config-4", "/etc/X11/XF86Config", "/etc/X11/xorg.conf"; require Xconfig::card; - Xconfig::card::libgl_config_and_more({ Driver => 'nv' }); + Xconfig::card::libgl_config_and_more({ Driver => 'nv' }) if $done; } } @@ -82,8 +86,13 @@ if (find { $_->{driver} =~ /ATI Radeon/ } detect_devices::probeall()) { require Xconfig::card; my @cards = Xconfig::card::probe(); my $driver = $cards[0]{Driver}; + my $done; substInFile { - log::explanations("switch X.org driver from fglrx to ati") if /Driver "fglrx"/; + if (/Driver "fglrx"/) { + $done = 1; + log::explanations("switch X.org driver from fglrx to ati"); + s!Driver "fglrx"!Driver "$driver"!g; + } s!Driver "fglrx"!Driver "$driver"!g; } $_ foreach grep { -e $_ } "/etc/X11/XF86Config-4", "/etc/X11/XF86Config", "/etc/X11/xorg.conf"; |