From 389588f26cd421c0a5a3bff0f83d906c2f68904b Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sun, 4 Dec 2011 02:24:19 +0000 Subject: service_harddrake: fix xorg.conf Driver switch regexp This fixes a driver switch failing to alter xorg.conf when the Driver line doesn't contain default whitespacing (reported by Barry Jackson). --- perl-install/NEWS | 2 ++ perl-install/standalone/service_harddrake | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index 5beb2667f..085f13643 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -3,6 +3,8 @@ switched o show a correct warning message when a proprietary driver is loaded while a free driver is configured + o fix driver switch failing to alter xorg.conf when the Driver line doesn't + contain default whitespacing (reported by Barry Jackson) Version 13.70.2 - 27 November 2011 diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index f29636753..8dbe2a8db 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -133,7 +133,7 @@ sub switch_x_driver { # This should use calls to Xconfig instead of substitution. However, currently # Xconfig probably makes too intrusive changes to xorg.conf when switching the driver. cp_af('/etc/X11/xorg.conf', "/etc/X11/xorg.conf.mga$^T"); - substInFile { s!Driver "($old_driver)"!Driver "$new_driver"!g } '/etc/X11/xorg.conf'; + substInFile { s!^(\s*Driver\s+)"$old_driver"!$1"$new_driver"!i } '/etc/X11/xorg.conf'; log::explanations("switch X.org driver from '$old_driver' to '$new_driver' ($reason)"); Xconfig::card::libgl_config_and_more({ Driver => $new_driver }); Xconfig::various::setup_kms(); -- cgit v1.2.1