summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-05-17 12:36:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-05-17 12:36:00 +0000
commitb24915d8b79bb48983f71f87d6323190f23e9e7a (patch)
treeba3eb5fbb4709ef06af91bc85878c9c75168eb74 /perl-install/Xconfig
parent6a5ee916519918308a8344bd17e182779a762855 (diff)
downloaddrakx-backup-do-not-use-b24915d8b79bb48983f71f87d6323190f23e9e7a.tar
drakx-backup-do-not-use-b24915d8b79bb48983f71f87d6323190f23e9e7a.tar.gz
drakx-backup-do-not-use-b24915d8b79bb48983f71f87d6323190f23e9e7a.tar.bz2
drakx-backup-do-not-use-b24915d8b79bb48983f71f87d6323190f23e9e7a.tar.xz
drakx-backup-do-not-use-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/Xconfig')
-rw-r--r--perl-install/Xconfig/xfree.pm10
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 {