summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-05 14:29:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-05 14:29:16 +0000
commit31de738c99ce16ee26595d7bf2d6e9500a5a10b1 (patch)
tree30cb27258fcac641440869517e35e28f29177eb1
parentf093421759947c0e1020139c8b0bdb057105c074 (diff)
downloaddrakx-backup-do-not-use-31de738c99ce16ee26595d7bf2d6e9500a5a10b1.tar
drakx-backup-do-not-use-31de738c99ce16ee26595d7bf2d6e9500a5a10b1.tar.gz
drakx-backup-do-not-use-31de738c99ce16ee26595d7bf2d6e9500a5a10b1.tar.bz2
drakx-backup-do-not-use-31de738c99ce16ee26595d7bf2d6e9500a5a10b1.tar.xz
drakx-backup-do-not-use-31de738c99ce16ee26595d7bf2d6e9500a5a10b1.zip
no_comment
-rw-r--r--docs/.cvsignore1
-rwxr-xr-xmake_ks_from_floppy8
-rw-r--r--perl-install/ChangeLog2
-rw-r--r--perl-install/Xconfigurator.pm14
-rw-r--r--perl-install/any.pm9
-rw-r--r--perl-install/fsedit.pm7
-rw-r--r--perl-install/install2.pm19
-rw-r--r--perl-install/install_any.pm21
-rw-r--r--perl-install/install_steps.pm5
-rw-r--r--perl-install/install_steps_auto_install.pm1
-rw-r--r--perl-install/install_steps_gtk.pm6
-rw-r--r--perl-install/install_steps_interactive.pm16
-rwxr-xr-xperl-install/standalone/XFdrake8
-rw-r--r--tools/i386/netboot/.cvsignore2
-rwxr-xr-xtools/i386/netboot/grubbin0 -> 260487 bytes
-rwxr-xr-xtools/i386/netboot/make_boot_network18
-rwxr-xr-xtools/i386/netboot/stage1.3c59xbin0 -> 512 bytes
-rwxr-xr-xtools/i386/netboot/stage1.3c90xbin0 -> 512 bytes
-rw-r--r--tools/i386/netboot/stage2.3c59xbin0 -> 86244 bytes
-rw-r--r--tools/i386/netboot/stage2.3c90xbin0 -> 88260 bytes
20 files changed, 85 insertions, 52 deletions
diff --git a/docs/.cvsignore b/docs/.cvsignore
new file mode 100644
index 000000000..a0593a470
--- /dev/null
+++ b/docs/.cvsignore
@@ -0,0 +1 @@
+pictures
diff --git a/make_ks_from_floppy b/make_ks_from_floppy
index 2ab7dde95..0c2c48331 100755
--- a/make_ks_from_floppy
+++ b/make_ks_from_floppy
@@ -1,4 +1,10 @@
+#!/bin/sh
+
+ks="install/ks.cfg"
+
+[ -e $ks ] || { echo "missing file $ks, create one based on $ks.default"; exit 1; }
+
sudo mount /mnt/floppy
-cp -f install/installinit/ks.cfg /mnt/floppy
+cp -f $ks /mnt/floppy
perl -pi -e 's/prompt 1//; s/\s*kickstart=\S+//g; s/append/append kickstart=auto_inst.cfg.pl/' /mnt/floppy/syslinux.cfg
sudo umount /mnt/floppy
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 342646318..6f610426d 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,4 +1,4 @@
-2000-08-04 Pixel <pixel@mandrakesoft.com>
+2000-08-04 Dam's <damien@mandrakesoft.com>
* any.pm (setAutoLogin): added this method to write xdm-config
* Xconfigurator.pm: clenead autologin code and use of above method
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index f0f51c162..bbac283d3 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -9,6 +9,7 @@ use log;
use detect_devices;
use run_program;
use Xconfigurator_consts;
+use any;
use my_gtk qw(:wrappers);
my $tmpconfig = "/tmp/Xconfig";
@@ -1020,7 +1021,7 @@ sub main {
}
my $ok = resolutionsConfiguration($o, auto => $::auto, noauto => $::noauto);
- $ok &&= testFinalConfig($o, $::auto, $::skiptest);
+ $ok &&= testFinalConfig($o, $::auto, $o->{skiptest});
my $quit;
until ($ok || $quit) {
@@ -1095,14 +1096,15 @@ Would you like X to start when you reboot?"), 1);
$l{uid} > 500, $l{name};
} cat_("$o->{prefix}/etc/passwd");
- !(exists $o->{miscellaneous}{autologuser} || $::auto || !@users || exists $o->{authentication}{NIS} ) &&
+ unless (exists $o->{miscellaneous}{autologuser} || $::auto || !@users || $o->{authentication}{NIS}) {
$in->ask_from_entries_refH(_("Autologin"),
_("I can set up your computer to automatically log on one user.
If you don't want to use this feature, click on the cancel button."),
-[ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ], )
- or delete $o->{miscellaneaous}{autologuser};
- set_autologin($prefix, $o->{miscellaneous}{autologuser}, "kde" ) if (@users && !exists $o->{authentication}{NIS} && exists $o->{miscellaneous}{autologuser});
- }
+ [ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ])
+ or delete $o->{miscellaneaous}{autologuser};
+ }
+ any::setAutologin($prefix, $o->{miscellaneous}{autologuser}, "kde");
+ }
run_program::rooted($prefix, "chkconfig", "--del", "gpm") if $o->{mouse}{device} =~ /ttyS/ && !$::isStandalone;
}
}
diff --git a/perl-install/any.pm b/perl-install/any.pm
index ec38ba7b1..7f59db74a 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -200,10 +200,11 @@ _("Default") => { val => \$default, type => 'bool' },
}
sub setAutologin {
- my ($prefix, $user, $wm) = @_;
- my $f="$prefix/etc/X11/xdm/xdm_config";
- substInFile { s/^(DisplayManager._0.autoUser).*\n//; $_ .= "DisplayManager._0.autoUser:\t$user\n" if eof } $f;
- substInFile { s/^(DisplayManager._0.autoString).*\n//; $_ .= "DisplayManager._0.autoString:\t$wm\n" if eof } $f;
+ my ($prefix, $user, $wm) = @_;
+ my $f = "$prefix/etc/X11/xdm/xdm_config";
+ my $t1 = "DisplayManager._0.autoUser:";
+ my $t2 = "DisplayManager._0.autoString:";
+ substInFile { s/^(\Q$t1\E|\Q$t2\E).*\n//; $_ .= "$t1\t$user\n$t2\t$wm\n" if eof && $user } $f;
# (dam's) : a patch for gdm is being done.
}
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 5df4cb109..cee6f88ff 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -443,11 +443,8 @@ sub verifyHds {
$hd->{primary} = { normal => [ grep { $hd->{device} eq $_->{rootDevice} } @parts ] };
}
}
- my $fstab = [ get_fstab(@$hds) ];
- if (is_empty_array_ref($fstab) && $readonly) {
- die _("You don't have any partitions!");
- }
- ($hds, $fstab, $ok);
+ $readonly && get_fstab(@$hds) == 0 and die _("You don't have any partitions!");
+ $ok;
}
#-######################################################################################
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index f7f6e2ccf..07301f810 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -224,8 +224,6 @@ $o = $::o = {
};
-$::oo = {};
-
#-######################################################################################
#- Steps Functions
#- each step function are called with two arguments : clicked(because if you are a
@@ -538,7 +536,7 @@ sub main {
#- c::unlimit_core() unless $::testing;
- my ($cfg, $patch);
+ my ($cfg, $patch, @auto);
my %cmdline; map {
my ($n, $v) = split '=';
$cmdline{$n} = $v || 1;
@@ -559,9 +557,9 @@ sub main {
map_each {
my ($n, $v) = @_;
my $f = ${{
- oem => sub { $::oo->{oem} = $v },
+ oem => sub { $o->{oem} = $v },
lang => sub { $o->{lang} = $v },
- flang => sub { $o->{lang} = $::oo->{lang} = $v },
+ flang => sub { $o->{lang} = $v ; push @auto, 'selectLanguage' },
method => sub { $o->{method} = $v },
pcmcia => sub { $o->{pcmcia} = $v },
vga16 => sub { $o->{vga16} = $v },
@@ -569,7 +567,7 @@ sub main {
expert => sub { $::expert = 1; $::beginner = 0 },
beginner => sub { $::beginner = $v },
class => sub { $o->{installClass} = $v },
- fclass => sub { $o->{installClass} = $::oo->{installClass} = $v },
+ fclass => sub { $o->{installClass} = $v; push @auto, "selectInstallClass" },
lnx4win => sub { $o->{lnx4win} = 1 },
readonly => sub { $o->{partitioning}{readonly} = $v ne "0" },
display => sub { $o->{display} = $v },
@@ -597,6 +595,9 @@ sub main {
$o->{method} ||= "cdrom";
$o->{mkbootdisk} = 0;
}
+ if ($o->{oem}) {
+ push @auto, 'exitInstall', 'selectMouse', 'timeConfig';
+ }
unless ($::testing) {
unlink $_ foreach ( $o->{pcmcia} ? () : ("/sbin/install"), #- #- install include cardmgr!
@@ -674,6 +675,12 @@ sub main {
$o->{interactive} = "newt";
require install_steps_newt;
}
+ foreach (@auto) {
+ eval "undef *" . (!/::/ && "install_steps_interactive::") . $_;
+ my $s = $o->{steps}{/::(.*)/ ? $1 : $_} or next;
+ $s->{hidden} = 1;
+ }
+
$::o = $o = $o_;
#- get stage1 network configuration if any.
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 3fd665cd4..f7743aa04 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -243,8 +243,9 @@ sub getAvailableSpace {
sub getAvailableSpace_mounted {
my ($prefix) = @_;
my $dir = -d "$prefix/usr" ? "$prefix/usr" : "$prefix";
- my ($free, undef) = common::df($dir) or return;
- $free || 1;
+ my (undef, $free) = common::df($dir) or return;
+ log::l("getAvailableSpace_mounted $free");
+ $free * 1024 || 1;
}
sub getAvailableSpace_raw {
my ($fstab) = @_;
@@ -323,20 +324,21 @@ sub addToBeDone(&$) {
sub getHds {
my ($o) = @_;
- my ($ok, $ok2) = 1;
+ my ($ok, $ok2) = (1, 1);
+ my $flags = $o->{partitioning};
my @drives = detect_devices::hds();
# add2hash_($o->{partitioning}, { readonly => 1 }) if partition_table_raw::typeOfMBR($drives[0]{device}) eq 'system_commander';
getHds:
- $o->{hds} = catch_cdie { fsedit::hds(\@drives, $o->{partitioning}) }
+ $o->{hds} = catch_cdie { fsedit::hds(\@drives, $flags) }
sub {
log::l("error reading partition table: $@");
my ($err) = $@ =~ /(.*) at /;
$@ =~ /overlapping/ and $o->ask_warn('', $@), return 1;
$o->ask_okcancel(_("Error"),
[_("I can't read your partition table, it's too corrupted for me :(
-I'll try to go on blanking bad partitions"), $err]) unless $o->{partitioning}{readonly};
+I'll try to go on blanking bad partitions"), $err]) unless $flags->{readonly};
$ok = 0; 1
};
@@ -345,20 +347,19 @@ I'll try to go on blanking bad partitions"), $err]) unless $o->{partitioning}{re
goto getHds;
}
- ($o->{hds}, $o->{fstab}, $ok2) = fsedit::verifyHds($o->{hds}, $o->{partitioning}{readonly}, $ok);
+ $ok2 = fsedit::verifyHds($o->{hds}, $flags->{readonly}, $ok)
+ unless $flags->{clearall} || $flags->{clear};
+ $o->{fstab} = [ fsedit::get_fstab(@{$o->{hds}}) ];
fs::check_mounted($o->{fstab});
fs::merge_fstabs($o->{fstab}, $o->{manualFstab});
- $o->{partitioning}{clearall} and return 1;
$o->ask_warn('',
_("DiskDrake failed to read correctly the partition table.
-Continue at your own risk!")) if !$ok2 && $ok && !$o->{partitioning}{readonly};
+Continue at your own risk!")) if !$ok2 && $ok && !$flags->{readonly};
my @win = grep { isFat($_) && isFat({ type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}};
-# my @nt = grep { isNT($_) && isNT( { type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}};
log::l("win parts: ", join ",", map { $_->{device} } @win) if @win;
-# log::l("nt parts: ", join ",", map { $_->{device} } @nt) if @nt;
if (@win == 1) {
$win[0]{mntpoint} = "/mnt/windows";
} else {
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index dfae6ebc1..8df7f94b5 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -859,7 +859,7 @@ sub setupXfree {
require class_discard;
{ local $::testing = 0; #- unset testing
local $::auto = 1;
- local $::skiptest = 1;
+ $o->{X}{skiptest} = 1;
Xconfigurator::main($o->{prefix}, $o->{X}, class_discard->new, $o->{allowFB}, bool($o->{pcmcia}), sub {
$o->pkg_install("XFree86-$_[0]");
});
@@ -927,6 +927,9 @@ sub generateAutoInstFloppy($) {
}
#------------------------------------------------------------------------------
+sub exitInstall { install_any::unlockCdrom }
+
+#------------------------------------------------------------------------------
sub hasNetwork {
my ($o) = @_;
diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm
index 8f92edb49..4c7c426e3 100644
--- a/perl-install/install_steps_auto_install.pm
+++ b/perl-install/install_steps_auto_install.pm
@@ -64,6 +64,7 @@ sub exitInstall {
my $O = bless $o, "install_steps_gtk";
$O->exitInstall($alldone);
} else {
+ install_steps::exitInstall;
print "\a";
print "Auto installation complete\n";
print "Press <Enter> to reboot\n";
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index e1b00d381..e3116ddac 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -184,9 +184,10 @@ sub selectInstallClass1 {
#------------------------------------------------------------------------------
sub selectMouse {
my ($o, $force) = @_;
+ my $old = $o->{mouse}{XMOUSETYPE};
$o->SUPER::selectMouse($force);
- if (!$::testing) {
+ if ($old ne $o->{mouse}{XMOUSETYPE} && !$::testing) {
log::l("telling X server to use another mouse");
eval { commands::modprobe("serial") } if $o->{mouse}{device} =~ /ttyS/;
symlinkf($o->{mouse}{device}, "/dev/mouse");
@@ -763,10 +764,7 @@ sub create_steps_window {
$w->show;
my @steps_icons = map { [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/step-$_.xpm") ] } qw(green orange red);
-
my $style = Gtk::Widget->get_default_style->copy;
- print $style->fg('normal');
- print $style->white;
gtkadd($w->{window},
gtkpack_(new Gtk::VBox(0,0),
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 0291af4b4..523ccd59a 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -56,7 +56,7 @@ sub selectLanguage($) {
_("Please, choose a language to use."),
# the translation may be used for the help
[ lang::list() ],
- lang::lang2text($o->{lang}))) unless $::oo->{lang};
+ lang::lang2text($o->{lang})));
install_steps::selectLanguage($o);
#- $o->{useless_thing_accepted} = $o->ask_from_list_('',
@@ -105,11 +105,6 @@ sub selectInstallClass1 {
sub selectInstallClass($@) {
my ($o, @classes) = @_;
- if ($::oo->{installClass}) {
- delete $::o->{mouse}{unsafe} if $::oo->{oem};
- return install_steps::selectInstallClass($o);
- }
-
my %c = my @c = (
$::corporate ? () : (
_("Automated") => "beginner",
@@ -158,7 +153,7 @@ sub selectMouse {
my $name = $o->ask_from_list_('', _("Please, choose the type of your mouse."), [ mouse::names() ], $o->{mouse}{FULLNAME});
$o->{mouse} = mouse::name2mouse($name);
}
- $o->{mouse}{XEMU3} = 'yes' if $o->{mouse}{nbuttons} < 3; #- if $o->{mouse}{nbuttons} < 3 && $o->ask_yesorno('', _("Emulate third button?"), 1);
+ $o->{mouse}{XEMU3} = 'yes' if $o->{mouse}{nbuttons} < 3;
if ($force && $o->{mouse}{device} eq "ttyS") {
$o->set_help('selectSerialPort');
@@ -636,7 +631,7 @@ sub timeConfig {
my ($o, $f, $clicked) = @_;
require timezone;
- $o->{timezone}{timezone} = $o->ask_from_treelist('', _("Which is your timezone?"), '/', [ timezone::getTimeZones($::g_auto_install ? '' : $o->{prefix}) ], $o->{timezone}{timezone}) if !$::oo->{oem} || $clicked;
+ $o->{timezone}{timezone} = $o->ask_from_treelist('', _("Which is your timezone?"), '/', [ timezone::getTimeZones($::g_auto_install ? '' : $o->{prefix}) ], $o->{timezone}{timezone}) if $clicked;
$o->{timezone}{UTC} = $o->ask_yesorno('', _("Is your hardware clock set to GMT?"), $o->{timezone}{UTC}) if $::expert || $clicked;
install_steps::timeConfig($o, $f);
}
@@ -960,7 +955,6 @@ Do you want to keep XFree 3.3?"), 0) if $::expert;
{ local $::testing = 0; #- unset testing
local $::auto = $::beginner;
local $::noauto = $::expert && !$o->ask_yesorno('', _("Try to find PCI devices?"), 1);
- local $::skiptest = $::oo->{oem}; #- if lang is forced, assume no test (HACK)
$::noauto = $::noauto; #- no warning
Xconfigurator::main($o->{prefix}, $o->{X}, $o, $o->{allowFB}, bool($o->{pcmcia}), sub {
@@ -1055,7 +1049,7 @@ _("Some steps are not completed.
Do you really want to quit now?"), 0);
- install_any::unlockCdrom;
+ install_steps::exitInstall;
$o->ask_warn('',
_("Congratulations, installation is complete.
@@ -1065,7 +1059,7 @@ For information on fixes which are available for this release of Linux-Mandrake,
consult the Errata available from http://www.linux-mandrake.com/.
Information on configuring your system is available in the post
-install chapter of the Official Linux-Mandrake User's Guide.")) if $alldone && !$::g_auto_install && !$::oo->{oem};
+install chapter of the Official Linux-Mandrake User's Guide.")) if $alldone && !$::g_auto_install;
}
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index 588925be6..072f770a1 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -28,14 +28,16 @@ local $_ = join '', @ARGV;
/-h/ and die "usage: XFdrake [--xf3] [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n";
+my $i = {};
+
+$::isStandalone = 1;
$::force_xf3 = /-xf3/;
$::beginner = /-beginner/;
$::expert = /-expert/;
$::auto = /-auto/;
$::noauto = /-noauto/;
-$::skiptest = /-skiptest/;
$::testing = /-testing/;
-$::isStandalone = 1;
+$i->{skiptest} = /-skiptest/;
my $f = "/usr/X11R6/lib/X11/Cards";
-e $f or system("urpmi --auto XFree86 XFree86-75dpi-fonts");
@@ -47,7 +49,7 @@ my $in = vnew interactive('su');
system("mount /proc 2>/dev/null"); # ensure /proc is mounted for pci probing
-my $i = $0 =~ Xdrakres ? Xconfig::getinfoFromXF86Config() : {};
+Xconfig::getinfoFromXF86Config($i) if $0 =~ Xdrakres;
Xconfig::getinfo($i);
Xconfigurator::main('', $i, $in, 0, -e "/etc/pcmcia", sub { system("urpmi --auto XFree86-$_[0]") });
diff --git a/tools/i386/netboot/.cvsignore b/tools/i386/netboot/.cvsignore
new file mode 100644
index 000000000..60db9a42c
--- /dev/null
+++ b/tools/i386/netboot/.cvsignore
@@ -0,0 +1,2 @@
+stage1
+stage2
diff --git a/tools/i386/netboot/grub b/tools/i386/netboot/grub
new file mode 100755
index 000000000..0837b0349
--- /dev/null
+++ b/tools/i386/netboot/grub
Binary files differ
diff --git a/tools/i386/netboot/make_boot_network b/tools/i386/netboot/make_boot_network
new file mode 100755
index 000000000..282c96c4c
--- /dev/null
+++ b/tools/i386/netboot/make_boot_network
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+[ -z "$1" ] && { echo "usage: $0 <network card type> (eg: 3c59x)" ; exit 1; }
+
+ks="../../../install/ks.cfg"
+[ -e $ks ] || { echo "missing file $ks, create one based on $ks.default"; exit 1; }
+
+
+ln -sf stage1.$1 stage1
+ln -sf stage2.$1 stage2
+
+mformat a:
+mcopy {menu.lst,stage1,stage2} a:
+mcopy $ks a:
+
+./grub --batch <<EOF
+install (fd0)/stage1 d (fd0) (fd0)/stage2 p (fd0)/menu.lst
+EOF
diff --git a/tools/i386/netboot/stage1.3c59x b/tools/i386/netboot/stage1.3c59x
new file mode 100755
index 000000000..28c5e0e92
--- /dev/null
+++ b/tools/i386/netboot/stage1.3c59x
Binary files differ
diff --git a/tools/i386/netboot/stage1.3c90x b/tools/i386/netboot/stage1.3c90x
new file mode 100755
index 000000000..28c5e0e92
--- /dev/null
+++ b/tools/i386/netboot/stage1.3c90x
Binary files differ
diff --git a/tools/i386/netboot/stage2.3c59x b/tools/i386/netboot/stage2.3c59x
new file mode 100644
index 000000000..234fc4544
--- /dev/null
+++ b/tools/i386/netboot/stage2.3c59x
Binary files differ
diff --git a/tools/i386/netboot/stage2.3c90x b/tools/i386/netboot/stage2.3c90x
new file mode 100644
index 000000000..27d471568
--- /dev/null
+++ b/tools/i386/netboot/stage2.3c90x
Binary files differ