diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-02-25 13:42:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-02-25 13:42:00 +0000 |
commit | 816f58d65b8b71979c32c1bac0e76c671861ccb7 (patch) | |
tree | a5cc5a978313d60954394652977314c4c07f4d99 /perl-install/install_steps_gtk.pm | |
parent | 02ffea566bf4fd9c895572fd1ab7f484bc77d739 (diff) | |
download | drakx-816f58d65b8b71979c32c1bac0e76c671861ccb7.tar drakx-816f58d65b8b71979c32c1bac0e76c671861ccb7.tar.gz drakx-816f58d65b8b71979c32c1bac0e76c671861ccb7.tar.bz2 drakx-816f58d65b8b71979c32c1bac0e76c671861ccb7.tar.xz drakx-816f58d65b8b71979c32c1bac0e76c671861ccb7.zip |
cleanup handling of XF4 server choice during install
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r-- | perl-install/install_steps_gtk.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 1ea7832c8..96f0f3947 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -37,13 +37,14 @@ sub new($$) { if ($ENV{DISPLAY} =~ /^:\d/ && !$::testing || $ENV{DISPLAY} ne $wanted_DISPLAY) { #- is the display local or distant? my $f = "/tmp/Xconf"; if (!$::testing) { - install_gtk::createXconf($f, @{$o->{mouse}}{"XMOUSETYPE", "device"}, $o->{mouse}{wacom}[0]); devices::make("/dev/kbd"); } my $launchX = sub { - my ($server) = @_; + my ($server, $Driver) = @_; my $ok = 1; my $xpmac_opts = cat_('/proc/cmdline'); + install_gtk::createXconf($f, @{$o->{mouse}}{"XMOUSETYPE", "device"}, $o->{mouse}{wacom}[0], $Driver); + mkdir '/var/log' if !-d '/var/log'; local $SIG{CHLD} = sub { $ok = 0 if waitpid(-1, c::WNOHANG()) > 0 }; @@ -92,7 +93,9 @@ sub new($$) { @servers = qw(Xsun24); } } elsif (arch() =~ /ia64/) { - @servers = 'XFree86'; + require Xconfig::card; + my ($card) = Xconfig::card::probe(); + @servers = map { if_($_, "Driver:$_") } $card && $card->{Driver}, 'fbdev'; } elsif (arch() eq "ppc") { @servers = qw(Xpmac); } @@ -100,7 +103,7 @@ sub new($$) { foreach (@servers) { log::l("Trying with server $_"); my $dir = "/usr/X11R6/bin"; - my $prog = /Xsun|Xpmac|XFree86|Xnest/ ? $_ : "XF86_$_"; + my ($prog, $Driver) = /Driver:(.*)/ ? ('XFree86', $1) : /Xsun|Xpmac|Xnest/ ? $_ : "XF86_$_"; unless (-x "$dir/$prog") { unlink $_ foreach glob_("$dir/X*"); install_any::getAndSaveFile("Mandrake/mdkinst$dir/$prog", "$dir/$prog") or die "failed to get server $prog: $!"; @@ -109,7 +112,7 @@ sub new($$) { if (/FB/) { !$o->{vga16} && $o->{allowFB} or next; - $o->{allowFB} = &$launchX($prog) #- keep in mind FB is used. + $o->{allowFB} = &$launchX($prog, $Driver) #- keep in mind FB is used. and goto OK; } else { $o->{vga16} = 1 if /VGA16/; |