summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-09-21 02:38:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-09-21 02:38:45 +0000
commit9042c69542e62f5acf18c4107a73ac9da68d5b8f (patch)
treeca9a70deb411231d0025eed557660eb35048007b /perl-install
parent804b3d5a24475fd18f3f4a816ce6f58a7d4d41d7 (diff)
downloaddrakx-9042c69542e62f5acf18c4107a73ac9da68d5b8f.tar
drakx-9042c69542e62f5acf18c4107a73ac9da68d5b8f.tar.gz
drakx-9042c69542e62f5acf18c4107a73ac9da68d5b8f.tar.bz2
drakx-9042c69542e62f5acf18c4107a73ac9da68d5b8f.tar.xz
drakx-9042c69542e62f5acf18c4107a73ac9da68d5b8f.zip
allow ignoring X config file when it contains errors
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/main.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm
index f1ad91f41..f260d48b5 100644
--- a/perl-install/Xconfig/main.pm
+++ b/perl-install/Xconfig/main.pm
@@ -159,7 +159,14 @@ sub configure_chooser {
sub configure_everything_or_configure_chooser {
my ($in, $options, $auto, $o_keyboard, $o_mouse) = @_;
- my $raw_X = Xconfig::xfree->read;
+ my $raw_X = eval { Xconfig::xfree->read };
+
+ if (!$raw_X) {
+ log::l("ERROR: bad X config file $@");
+ $in->ask_okcancel('',
+ N("Your Xorg configuration file is broken, we will ignore it.")) or return;
+ $raw_X = [];
+ }
if (is_empty_array_ref($raw_X)) {
$raw_X = Xconfig::default::configure($o_keyboard, $o_mouse);