summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-10-10 14:38:08 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-10-10 14:38:08 +0000
commitd402a1848a17ee73540d22ffc5e291a4b87626c5 (patch)
tree913b9edd0b90888d66ac44c1f054781bcc10d6c2 /perl-install
parentd7525a28e68b9c17fe5680cbbf9dc1842afef430 (diff)
downloaddrakx-d402a1848a17ee73540d22ffc5e291a4b87626c5.tar
drakx-d402a1848a17ee73540d22ffc5e291a4b87626c5.tar.gz
drakx-d402a1848a17ee73540d22ffc5e291a4b87626c5.tar.bz2
drakx-d402a1848a17ee73540d22ffc5e291a4b87626c5.tar.xz
drakx-d402a1848a17ee73540d22ffc5e291a4b87626c5.zip
configure automatically XFree and allow to launch interactive_gtk with it
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm5
-rw-r--r--perl-install/install_steps_gtk.pm14
2 files changed, 14 insertions, 5 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index d021f37c8..cdba1e737 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -429,12 +429,9 @@ sub main {
if ($::move) {
require move;
move::init();
- $::mdkinst = '';
- } else {
- $::mdkinst = 'Mandrake/mdkinst';
}
- $o->{prefix} = $::prefix = $::testing ? "/tmp/test-perl-install" : $::live ? "" : "/mnt";
+ $o->{prefix} = $::prefix = $::testing ? "/tmp/test-perl-install" : $::live || $::move ? "" : "/mnt";
$o->{isUpgrade} = 1 if $::live;
mkdir $o->{prefix}, 0755;
devices::make("/dev/zero"); #- needed by ddcxinfos
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index ea95f679f..9279e498c 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -41,6 +41,8 @@ sub new($$) {
}
my $launchX = sub {
my ($server, $Driver) = @_;
+ $::move and goto launch_X;
+
my $xpmac_opts = cat_('/proc/cmdline');
install_gtk::createXconf($f, @{$o->{mouse}}{"XMOUSETYPE", "device"}, $o->{mouse}{wacom}[0], $Driver);
@@ -56,6 +58,7 @@ sub new($$) {
push @options, '-fp', '/usr/X11R6/lib/X11/fonts:unscaled' if $server =~ /Xsun|Xpmac/;
push @options, '-ac', '-geometry', $o->{vga16} ? '640x480' : '800x600' if $server eq 'Xnest';
+ launch_X:
if (!fork()) {
c::setsid();
exec $server, @options or exit 1;
@@ -98,12 +101,20 @@ sub new($$) {
@servers = map { if_($_, "Driver:$_") } $card && $card->{Driver}, 'fbdev';
} elsif (arch() eq "ppc") {
@servers = qw(Xpmac);
+ }
+
+ if ($::move) {
+ require move;
+ require run_program;
+ move::automatic_xconf($o);
+ run_program::rooted('', '/sbin/service', 'xfs', 'start');
+ @servers = qw(X);
}
foreach (@servers) {
log::l("Trying with server $_");
my $dir = "/usr/X11R6/bin";
- my ($prog, $Driver) = /Driver:(.*)/ ? ('XFree86', $1) : /Xsun|Xpmac|Xnest/ ? $_ : "XF86_$_";
+ my ($prog, $Driver) = /Driver:(.*)/ ? ('XFree86', $1) : /Xsun|Xpmac|Xnest|^X$/ ? $_ : "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: $!";
@@ -118,6 +129,7 @@ sub new($$) {
$o->{vga16} = 1 if /VGA16/;
&$launchX($prog, $Driver) and goto OK;
}
+ $::move and die "can't launch graphical mode :(\n";
}
return undef;
}