summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-28 13:19:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-28 13:19:19 +0000
commita3a3d40e6c67309b0f4bd6565aa43ad243c55dd6 (patch)
treeec2473ae5eae613569688f02a29098894bb4bd91 /perl-install
parent0bf26233b2d8462a32162b32e77cced0fc90e13e (diff)
downloaddrakx-a3a3d40e6c67309b0f4bd6565aa43ad243c55dd6.tar
drakx-a3a3d40e6c67309b0f4bd6565aa43ad243c55dd6.tar.gz
drakx-a3a3d40e6c67309b0f4bd6565aa43ad243c55dd6.tar.bz2
drakx-a3a3d40e6c67309b0f4bd6565aa43ad243c55dd6.tar.xz
drakx-a3a3d40e6c67309b0f4bd6565aa43ad243c55dd6.zip
fix calling export_to_install_X in configure_everything_auto_install
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/main.pm30
1 files changed, 16 insertions, 14 deletions
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm
index cc657248a..661f1d5f5 100644
--- a/perl-install/Xconfig/main.pm
+++ b/perl-install/Xconfig/main.pm
@@ -34,16 +34,14 @@ sub configure_resolution {
sub configure_everything_auto_install {
my ($raw_X, $do_pkgs, $old_X, $options) = @_;
-
- my $monitor = Xconfig::monitor::configure_auto_install($raw_X, $old_X) or return;
- $options->{VideoRam_probed} = $monitor->{VideoRam_probed};
- my $card = Xconfig::card::configure_auto_install($raw_X, $do_pkgs, $old_X, $options) or return;
- Xconfig::screen::configure($raw_X, $card) or return;
- my $resolution = Xconfig::resolution_and_depth::configure_auto_install($raw_X, $card, $monitor, $old_X);
+ my $X = {};
+ $X->{monitor} = Xconfig::monitor::configure_auto_install($raw_X, $old_X) or return;
+ $options->{VideoRam_probed} = $X->{monitor}{VideoRam_probed};
+ $X->{card} = Xconfig::card::configure_auto_install($raw_X, $do_pkgs, $old_X, $options) or return;
+ Xconfig::screen::configure($raw_X, $X->{card}) or return;
+ $X->{resolution} = Xconfig::resolution_and_depth::configure_auto_install($raw_X, $X->{card}, $X->{monitor}, $old_X);
- export_to_install_X($card, $monitor, $resolution);
- $raw_X->write;
- symlinkf "../..$card->{prog}", "$::prefix/etc/X11/X" if $card->{server} !~ /Xpmac/;
+ &write($raw_X, $X);
any::runlevel($::prefix, exists $old_X->{xdm} && !$old_X->{xdm} ? 3 : 5);
}
@@ -64,7 +62,7 @@ sub configure_everything {
} else {
Xconfig::various::various($in, $X->{card}, $options, $auto);
}
- $ok = &write($in, $raw_X, $X, $ok);
+ $ok = may_write($in, $raw_X, $X, $ok);
$ok && 'config_changed';
}
@@ -135,12 +133,12 @@ sub configure_chooser {
};
my ($ok, $modified) = configure_chooser_raw($in, $raw_X, $do_pkgs, $options, $X);
- $modified and &write($in, $raw_X, $X, $ok) or return;
+ $modified and may_write($in, $raw_X, $X, $ok) or return;
'config_changed';
}
-sub write {
+sub may_write {
my ($in, $raw_X, $X, $ok) = @_;
$ok ||= $in->ask_yesorno('', _("Keep the changes?
@@ -148,15 +146,19 @@ The current configuration is:
%s", Xconfig::various::info($raw_X, $X->{card})), 1);
- $ok or return;
+ &write($raw_X, $X) if $ok;
+ $ok;
+}
+sub write {
+ my ($raw_X, $X) = @_;
export_to_install_X($X);
$raw_X->write;
Xconfig::various::check_XF86Config_symlink();
symlinkf "../..$X->{card}{prog}", "$::prefix/etc/X11/X" if $X->{card}{server} !~ /Xpmac/;
- 1;
}
+
sub export_to_install_X {
my ($X) = @_;