From b24915d8b79bb48983f71f87d6323190f23e9e7a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 17 May 2004 12:36:00 +0000 Subject: restore the ability to specify the file where the config should be written (since it's used by Xconfig/test.pm) --- perl-install/Xconfig/xfree.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'perl-install/Xconfig') diff --git a/perl-install/Xconfig/xfree.pm b/perl-install/Xconfig/xfree.pm index 33600f9c0..079f8baf1 100644 --- a/perl-install/Xconfig/xfree.pm +++ b/perl-install/Xconfig/xfree.pm @@ -22,10 +22,12 @@ sub read { $class->new(Xconfig::parse::read_XF86Config($file)); } sub write { - my ($raw_X) = @_; - my $file = "$::prefix/etc/X11/XF86Config"; - rename $file, "$file.old"; - rename "$file-4", "$file-4.old"; #- there won't be any XF86Config-4 anymore, we want this! + my ($raw_X, $o_file) = @_; + my $file = $o_file || "$::prefix/etc/X11/XF86Config"; + if (!$o_file) { + rename $file, "$file.old"; + rename "$file-4", "$file-4.old"; #- there won't be any XF86Config-4 anymore, we want this! + } Xconfig::parse::write_XF86Config($raw_X, $file); } sub prepare_write { -- cgit v1.2.1