diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-05-17 12:36:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-05-17 12:36:00 +0000 |
commit | b24915d8b79bb48983f71f87d6323190f23e9e7a (patch) | |
tree | ba3eb5fbb4709ef06af91bc85878c9c75168eb74 /perl-install | |
parent | 6a5ee916519918308a8344bd17e182779a762855 (diff) | |
download | drakx-b24915d8b79bb48983f71f87d6323190f23e9e7a.tar drakx-b24915d8b79bb48983f71f87d6323190f23e9e7a.tar.gz drakx-b24915d8b79bb48983f71f87d6323190f23e9e7a.tar.bz2 drakx-b24915d8b79bb48983f71f87d6323190f23e9e7a.tar.xz drakx-b24915d8b79bb48983f71f87d6323190f23e9e7a.zip |
restore the ability to specify the file where the config should be written (since it's used by Xconfig/test.pm)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Xconfig/xfree.pm | 10 |
1 files changed, 6 insertions, 4 deletions
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 { |