summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-10-29 03:06:22 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-10-29 03:06:22 +0000
commitaa912d0daeaa6d4d84addfd2fc0ebba11e137edd (patch)
tree4c59162be3d838b69b3c709075e83b8bc9d61b7a
parenta519379c3ae2eeb70650b6fd9e608bd285d2eba2 (diff)
downloaddrakx-aa912d0daeaa6d4d84addfd2fc0ebba11e137edd.tar
drakx-aa912d0daeaa6d4d84addfd2fc0ebba11e137edd.tar.gz
drakx-aa912d0daeaa6d4d84addfd2fc0ebba11e137edd.tar.bz2
drakx-aa912d0daeaa6d4d84addfd2fc0ebba11e137edd.tar.xz
drakx-aa912d0daeaa6d4d84addfd2fc0ebba11e137edd.zip
no_comment
-rw-r--r--docs/TODO95
-rwxr-xr-xmake_boot_img4
-rw-r--r--perl-install/Makefile12
-rw-r--r--perl-install/Xconfigurator.pm12
-rw-r--r--perl-install/commands.pm22
-rw-r--r--perl-install/common.pm21
-rw-r--r--perl-install/fs.pm6
-rw-r--r--perl-install/install2.pm17
-rw-r--r--perl-install/install_any.pm27
-rw-r--r--perl-install/install_steps.pm2
-rw-r--r--perl-install/install_steps_interactive.pm18
-rw-r--r--perl-install/interactive_gtk.pm19
-rw-r--r--perl-install/keyboard.pm6
-rw-r--r--perl-install/lang.pm9
-rw-r--r--perl-install/my_gtk.pm16
-rw-r--r--perl-install/share/list8
16 files changed, 169 insertions, 125 deletions
diff --git a/docs/TODO b/docs/TODO
index 4e5649e5a..ced9251b1 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -1,89 +1,88 @@
-warn the user if not enough ram to fulfill install
+i18n
-using setxkb, enable the testing of the keyboard
+standalone configuration applications
-enable the testing of the mouse type (under X) (wheel)
+ask proxy from http/ftp proxy
-add fdisk using the zvt widget (taken in gnome-libs)
+X configuration, bootloader in kickstart
-test after printer config
+(pix)kickstart
-diskdrake should warn if nb_ide_parts > 63, nb_scsi_parts > 15
+(pix)diskdrake
-propose fb in XFdrake
+(pix)NIS
-update the list of modules (in update_kernel)
+text install
+
+(fpons)test after printer config
+(pix)warn the user if not enough ram to fulfill install
+
+(pix)options in mkfs
+
+update the list of modules (in update_kernel)
merge the install(1) of redhat
-lilo-deinstallation in case of lilo auto-installation for beginners
+initrd in bzip2
-verify the free space is big enough.
+suggested partition tables must be better foreach installClass
-loadFont sucks
+(fpons)verify the free space is big enough.
have a better time estimation of the remaining time in install packages
-trash on the screen when X first starts
-
-get the error when reading .rpm files fail
+(pix)ask for more than the memory size detected
-ask for notepad (aka portable) or not
-ask for hdparm or not
-ask for more than the memory size detected
-#ask for the VGA mode for lilo or vidmode
-ask the security level
+(fpons)pb with dependencies ``missing'': icewm do not require XFree86 and so you can have icewm but no X server
-remove the gray line surrounding the logo
+(?)maybe remove commented lines in /usr/lib/perl5/... files
-pb with dependencies ``missing'': icewm do not require XFree86 and so you can have icewm but no X server
+(pix) try detect_devices::floppies (and how are scsi floppies handled?)
+maybe: do a iotcl FDGETPRM to detect fd1, fd0.
-rewrite mouseconfig in perl?
+(pix) kudzu or not in miscellaneous
-cleanup /etc/services & /etc/protocols
+(fpons)modem config
-maybe remove commented lines in /usr/lib/perl5/... files
+smaller zsh (or ash in initrd)
-handle zip/dat drives
+--------------------------------------------------------------------------------
+aha152x needs "insmod aha152x.o aha152x=0x140,11,7"
-# in 2.3.15 "Silicon Integrated Systems [SiS]|SiS900 10/100 Ethernet" is handled
+grub, chos
-remove cpio from base when mkbootdisk deps is added
+(?)timezone using a picture (pb: how to delimit zones)
-timezone using a picture (pb: how to delimit zones)
+(fpons)handle dat drives
-suggested partition tables must be better foreach installClass
+sound config
-the different xmodmaps for every languages (maybe gnome-core xmodmaps can help)
-xmodmap needed even for english as the backspace is not what it should
+(?)ability to select the type of install when booting of cdrom
+(?)use the ability of el torito to handle 2.88MB or more
-aha152x needs "insmod aha152x.o aha152x=0x140,11,7"
+add fdisk using the zvt widget (taken in gnome-libs)
-have isofs in module.
+using setxkb, enable the testing of the keyboard
-replace in place catchable die's by cdie's (as in partition_table::load)
+enable the testing of the mouse type (under X) (wheel)
-strange: no scsi of type 'fd', only 'tape'
+diskdrake should warn if nb_ide_parts > 63, nb_scsi_parts > 15
-try detect_devices::floppies (and how are scsi floppies handled?)
-maybe: do a iotcl FDGETPRM to detect fd1, fd0.
+(obsolete)lilo-deinstallation in case of lilo auto-installation for beginners
-test smp (is it enough to scan /proc/cpuinfo for multiple /^processor/ lines?)
+(?)loadFont sucks
-remove the nasty wrapping arrow (in help) by patching gtk :(
+(obsolete)trash on the screen when X first starts
-in ask_from_list, the horizontal scroll is buggy
+(?)get the error when reading .rpm files fail
-df is bugged (show bad sizes)
+(?)remove the gray line surrounding the logo
-wish: ability to select the type of install when booting of cdrom
+(?)rewrite mouseconfig in perl?
-use the ability of el torito to handle 2.88MB or more
+(?)cleanup /etc/services & /etc/protocols
-use ddcprobe monitor's size info for pnp monitors
-use ddcprobe video card memory size info
-use ddcprobe modelines to reduce the available resolutions
+# in 2.3.15 "Silicon Integrated Systems [SiS]|SiS900 10/100 Ethernet" is handled
-kickstart like
-tolook qw(fstab )
+(?)strange: no scsi of type 'fd', only 'tape'
diff --git a/make_boot_img b/make_boot_img
index 9c1f5e25c..aa1bf0edb 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -7,7 +7,7 @@
$instdir = "install";
$ks = "kickstart=floppy" if $type =~ s/_ks//;
$mnt = "/mnt/disk";
-$mke2fs = "/sbin/mke2fs -q -m 0 -F";
+$mke2fs = "/sbin/mke2fs -q -m 0 -F -s 1";
if ($>) {
$sudo = "sudo";
@@ -89,7 +89,7 @@ sub msg_boot_img {
output("$mnt/syslinux.cfg", "
default linux
prompt 1
-timeout 172
+timeout 72
display boot.msg
F1 boot.msg
F2 general.msg
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 700214207..20fb2b1ab 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -1,6 +1,6 @@
VERSION = 2.2.10-BOOT
SUDO = sudo
-MKE2FS = /sbin/mke2fs -q -m 0 -F
+MKE2FS = /sbin/mke2fs -q -m 0 -F -s 1
SO_FILES = c/blib/arch/auto/c/c.so
PMS = *.pm c/stuff.pm resize_fat/*.pm pci_probing/*.pm commands install2 diskdrake XFdrake g_auto_install
REP4PMS = /usr/bin/perl-install
@@ -119,6 +119,8 @@ get_needed_files: $(DIRS)
install -d `dirname $$d` && \
if (echo $$i | grep -q "\.pm"); then \
perl -pe '$$_ =~ /^__END__/ and exit(0);' $$i > $$d; \
+ elif (echo $$i | grep -q "\.so"); then \
+ install -s $$i $$d; \
else \
cp -f $$i $$d; \
fi; \
@@ -129,7 +131,7 @@ get_needed_files: $(DIRS)
cd $(DEST)/usr/bin ; mv insmod insmod_
rmdir $(DEST)/bin $(DEST)/sbin
- ln -sf ash $(DEST)/usr/bin/sh
+ ln -sf zsh $(DEST)/usr/bin/sh
tar xfy locales.tar.bz2 -C $(DEST)
# DEST=$(DEST) perl -I. -MForMakefile -e 'locale()'
@@ -172,13 +174,13 @@ stage2:
$(SUDO) cp -a $(DEST)/* $(STAGE2TMP)
$(SUDO) umount /mnt/stage2 ; true
- dd if=/dev/zero of=$(STAGE2) bs=1M count=16
- $(MKE2FS) $(STAGE2)
+ dd if=/dev/zero of=$(STAGE2) bs=1M count=14
+ $(MKE2FS) -N 1000 $(STAGE2)
$(SUDO) mount -t ext2 $(STAGE2) /mnt/stage2 -o loop
# hack to reduce the STAGE2 image
rm $(STAGE2TMP)/usr/X11R6/bin/XF86_VGA16
- for i in /usr/share/locale /usr/share/keymaps /usr/share/xmodmap; do \
+ for i in /usr/share/locale /usr/share/keymaps /usr/share/xmodmap $(REP4PMS)/po; do \
name=`basename $$i` ; \
(cd $(STAGE2TMP)/$$i ; find * | cpio -o 2>/dev/null | bzip2 > ../$$name.cpio.bz2 ; cd .. ; rm -rf $$name) \
done
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index fd250fea0..3439510dc 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -5,7 +5,7 @@ use strict;
use vars qw($in $install $resolution_wanted @depths @monitorSize2resolution @hsyncranges %min_hsync4wres @vsyncranges %depths @resolutions %serversdriver @svgaservers @accelservers @allservers %videomemory @ramdac_name @ramdac_id @clockchip_name @clockchip_id %keymap_translate %standard_monitors $intro_text $finalcomment_text $s3_comment $cirrus_comment $probeonlywarning_text $monitorintro_text $hsyncintro_text $vsyncintro_text $XF86firstchunk_text $keyboardsection_start $keyboardsection_part2 $keyboardsection_end $pointersection_text1 $pointersection_text2 $monitorsection_text1 $monitorsection_text2 $monitorsection_text3 $monitorsection_text4 $modelines_text_Trident_TG_96xx $modelines_text $devicesection_text $screensection_text1 %lines %xkb_options);
use pci_probing::main;
-use common qw(:common :file :functional);
+use common qw(:common :file :functional :system);
use log;
use Xconfigurator_consts;
@@ -111,12 +111,8 @@ sub readMonitorsDB {
sub rewriteInittab {
my ($runlevel) = @_;
- local @ARGV = grep { -r $_ } "$prefix/etc/inittab" or log::l("missing inittab!!!"), return;
- local $^I = '';
- while (<>) {
- s/^(id:)[35](:initdefault:)\s*$/$1$runlevel$2\n/;
- print;
- }
+ substInFile { s/^(id:)[35](:initdefault:)\s*$/$1$runlevel$2\n/ }
+ (grep { -r $_ } "$prefix/etc/inittab" or log::l("missing inittab!!!"), return);
}
sub keepOnlyLegalModes {
@@ -708,7 +704,7 @@ sub main {
__("Test again") => sub { $ok = testFinalConfig($o, 1) },
__("Quit") => sub { $quit = 1 },
);
- &{$c{$in->ask_from_list_('',
+ &{$c{$in->ask_from_list_([''],
_("What do you want to do?"),
[ grep { !ref } @c ])}};
}
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index bb64fc180..c6f68c37a 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -447,7 +447,7 @@ $l{Destination}, $l{Gateway}, $l{Mask}, $l{Iface}
sub df {
my ($h) = getopts(\@_, qw(h));
- my ($dev, $size, $free, $used, $use, $mntpoint);
+ my ($dev, $blocksize, $size, $free, $used, $use, $mntpoint);
open DF, ">&STDOUT";
format DF_TOP =
Filesystem Size Used Avail Use Mounted on
@@ -465,7 +465,9 @@ $dev, $size, $used, $free, $use, $mntpoint
$mntpoint = $h{$dev};
my $buf = ' ' x 20000;
syscall_('statfs', $mntpoint, $buf) or next;
- (undef, undef, $size, $free) = unpack "l7", $buf;
+ (undef, $blocksize, $size, undef, $free, undef) = unpack "L2L4", $buf;
+ $_ *= $blocksize / 1024 foreach $size, $free;
+
$size or next;
$use = int (100 * ($size - $free) / $size);
@@ -490,6 +492,22 @@ sub lspci {
require 'pci_probing/main.pm';
print join "\n", pci_probing::main::list (), '';
}
+sub dmesg { print cat_("/tmp/syslog"); }
+
+sub install_cpio($$) {
+ my ($dir, $name) = @_;
+
+ return "$dir/$name" if -e "$dir/$name";
+
+ my $cpio = "$dir.cpio.bz2";
+ -e $cpio or return;
+
+ eval { rm("-r", $dir) };
+ mkdir $dir, 0755;
+ require 'run_program.pm';
+ run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/*");
+ "$dir/$name";
+}
#-######################################################################################
#- Wonderful perl :(
diff --git a/perl-install/common.pm b/perl-install/common.pm
index e7c85ec2f..09f39db3b 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -9,7 +9,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int
common => [ qw(__ even odd min max sqr sum sign product bool invbool listlength bool2text text2bool to_int to_float ikeys member divide is_empty_array_ref is_empty_hash_ref add2hash add2hash_ set_new set_add round round_up round_down first second top uniq translate untranslate warp_text formatAlaTeX formatLines) ],
functional => [ qw(fold_left compose map_index grep_index map_each grep_each map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie) ],
file => [ qw(dirname basename touch all glob_ cat_ symlinkf chop_ mode typeFromMagic) ],
- system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh) ],
+ system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInCsh substInFile) ],
constant => [ qw($printable_chars $sizeof_int $bitof_int $SECTORSIZE) ],
);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
@@ -57,7 +57,7 @@ sub add2hash_ { my ($a, $b) = @_; while (my ($k, $v) = each %{$b || {}}) { exist
sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 }
sub dirname { @_ == 1 or die "usage: dirname <name>\n"; local $_ = shift; s|[^/]*/*\s*$||; s|(.)/*$|$1|; $_ || '.' }
sub basename { @_ == 1 or die "usage: basename <name>\n"; local $_ = shift; s|/*\s*$||; s|.*/||; $_ }
-sub bool { $_[0] ? 1 : 0 }
+sub bool($) { $_[0] ? 1 : 0 }
sub invbool { my $a = shift; $$a = !$$a; $$a }
sub listlength { scalar @_ }
sub bool2text { $_[0] ? "true" : "false" }
@@ -247,7 +247,7 @@ sub translate {
}
sub untranslate($@) {
- my $s = shift;
+ my $s = shift || return;
foreach (@_) { translate($_) eq $s and return $_ }
die "untranslate failed";
}
@@ -329,6 +329,21 @@ sub setVarsInSh {
open F, "> $_[0]" or die "cannot create config file $file";
$l->{$_} and print F "$_=$l->{$_}\n" foreach @fields;
}
+sub setVarsInCsh {
+ my ($file, $l, @fields) = @_;
+ @fields = keys %$l unless @fields;
+
+ local *F;
+ open F, "> $_[0]" or die "cannot create config file $file";
+ $l->{$_} and print F "setenv $_ $l->{$_}\n" foreach @fields;
+}
+
+sub substInFile(&@) {
+ my $f = shift;
+ local @ARGV = @_ or return;
+ local ($^I, $_) = '';
+ while (<>) { &$f($_); print }
+}
sub best_match {
my ($str, @lis) = @_;
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 691c10ce6..7e9b460a4 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -57,7 +57,9 @@ sub get_mntpoints_from_fstab($) {
}
}
-sub format_ext2($;$) {
+#- mke2fs -b (1024|2048|4096) -c -i(1024 > 262144) -N (1 > 100000000) -m (0-100%) -L volume-label
+#- tune2fs
+sub format_ext2($@) {
my ($dev, @options) = @_;
$dev =~ m,(rd|ida)/, and push @options, qw(-b 4096 -R stride=16); #- For RAID only.
@@ -65,7 +67,7 @@ sub format_ext2($;$) {
run_program::run("mke2fs", devices::make($dev), @options) or die _("%s formatting of %s failed", "ext2", $dev);
}
-sub format_dos($;$@) {
+sub format_dos($@) {
my ($dev, @options) = @_;
run_program::run("mkdosfs", devices::make($dev), @options) or die _("%s formatting of %s failed", "dos", $dev);
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 894f80df2..d9597c010 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -68,6 +68,7 @@ for (my $i = 0; $i < @installSteps; $i += 2) {
$h{next} = $installSteps[$i + 2];
$h{entered} = 0;
$h{onError} = $installSteps[$i + 2 * $h{onError}];
+ $h{reachable} = !$h{needs};
$installSteps{ $installSteps[$i] } = \%h;
push @orderedInstallSteps, $installSteps[$i];
}
@@ -123,7 +124,7 @@ $o = $::o = {
mkbootdisk => 1, #- no mkbootdisk if 0 or undef, find a floppy with 1, or fd1
#- packages => [ qw() ],
partitioning => { clearall => 0, eraseBadPartitions => 0, auto_allocate => 0, autoformat => 0, readonly => 0 },
- security => 3,
+#- security => 3,
#- partitions => [
#- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
#- { mntpoint => "/", size => 256 << 11, type => 0x83 },
@@ -181,7 +182,7 @@ $o = $::o = {
steps => \%installSteps,
orderedSteps => \@orderedInstallSteps,
- base => [ qw(basesystem sed initscripts console-tools mkbootdisk anacron utempter ldconfig chkconfig ntsysv mktemp setup filesystem SysVinit bdflush crontabs dev e2fsprogs etcskel fileutils findutils getty_ps grep groff gzip hdparm info initscripts isapnptools kernel less ldconfig lilo logrotate losetup man mkinitrd mingetty modutils mount net-tools passwd procmail procps psmisc mandrake-release rootfiles rpm sash sed setserial shadow-utils sh-utils slocate stat sysklogd tar termcap textutils time tmpwatch util-linux vim-minimal vixie-cron which cpio perl-base) ],
+ base => [ qw(basesystem sed initscripts console-tools mkbootdisk anacron utempter ldconfig chkconfig ntsysv mktemp setup filesystem SysVinit bdflush crontabs dev e2fsprogs etcskel fileutils findutils getty_ps grep groff gzip hdparm info initscripts isapnptools kernel less ldconfig lilo logrotate losetup man mkinitrd mingetty modutils mount net-tools passwd procmail procps psmisc mandrake-release rootfiles rpm sash sed setserial shadow-utils sh-utils slocate stat sysklogd tar termcap textutils time tmpwatch util-linux vim-minimal vixie-cron which perl-base) ],
#- for the list of fields available for user and superuser, see @etc_pass_fields in install_steps.pm
#- intf => [ { DEVICE => "eth0", IPADDR => '1.2.3.4', NETMASK => '255.255.255.128' } ],
@@ -310,7 +311,7 @@ sub formatPartitions {
eval { $o = $::o = install_any::loadO($o) } if $_[1] == 1;
}
mkdir "$o->{prefix}/$_", 0755 foreach
- qw(dev etc etc/sysconfig etc/sysconfig/console etc/sysconfig/network-scripts
+ qw(dev etc etc/profile.d etc/sysconfig etc/sysconfig/console etc/sysconfig/network-scripts
home mnt tmp var var/tmp var/lib var/lib/rpm);
mkdir "$o->{prefix}/$_", 0700 foreach qw(root);
}
@@ -336,6 +337,11 @@ sub doInstallStep {
$o->installPackages($o->{packages});
$o->afterInstallPackages;
}
+#------------------------------------------------------------------------------
+sub miscellaneous {
+ $o->miscellaneous($_[0]);
+ addToBeDone { install_any::fsck_option() } 'doInstallStep';
+}
#------------------------------------------------------------------------------
sub configureNetwork {
@@ -412,8 +418,6 @@ sub configureX {
$o->setupXfree if $o->{packages}{XFree86}{installed} || $clicked;
}
#------------------------------------------------------------------------------
-sub miscellaneous { $o->miscellaneous($_[0]); }
-#------------------------------------------------------------------------------
sub exitInstall { $o->exitInstall(getNextStep() eq "exitInstall") }
@@ -535,7 +539,7 @@ sub main {
$o->kill_action;
/^setstep (.*)/ and $o->{step} = $1, $clicked = 1, redo MAIN;
/^theme_changed$/ and redo MAIN;
- unless (/^already displayed/) {
+ unless (/^already displayed/ || /^ask_from_list cancel/) {
eval { $o->errorInStep($_) };
$@ and next;
}
@@ -548,6 +552,7 @@ sub main {
last if $o->{step} eq 'exitInstall';
}
+ substInFile { s|/sbin/mingetty tty1.*|/bin/bash --login| } "$o->{prefix}/etc/inittab" if $o->{security} < 2;
fs::write($o->{prefix}, $o->{fstab});
modules::write_conf("$o->{prefix}/etc/conf.modules", 'append');
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index b810506ea..c76778f63 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -158,20 +158,6 @@ sub addToBeDone(&$) {
push @{$::o->{steps}{$step}{toBeDone}}, $f;
}
-sub install_cpio($$) {
- my ($dir, $name) = @_;
-
- return "$dir/$name" if -e "$dir/$name";
-
- my $cpio = "$dir.cpio.bz2";
- -e $cpio or return;
-
- eval { commands::rm("-r", $dir) };
- mkdir $dir, 0755;
- run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/*");
- "$dir/$name";
-}
-
sub getHds {
my ($o) = @_;
my ($ok, $ok2) = 1;
@@ -291,16 +277,13 @@ sub enableShadow() {
sub enableMD5Shadow($$$) {
my ($prefix, $shadow, $md5) = @_;
- local @ARGV = grep { -r $_ } map { "$prefix/etc/pam.d/$_" } qw(login rlogin passwd) or return;
- local $^I = '';
- while (<>) {
+ substInFile {
if (/^password.*pam_pwdb.so/) {
s/\s*shadow//; s/\s*md5//;
s/$/ shadow/ if $shadow;
s/$/ md5/ if $md5;
}
- print;
- }
+ } grep { -r $_ } map { "$prefix/etc/pam.d/$_" } qw(login rlogin passwd);
}
sub crypt($) {
@@ -349,7 +332,7 @@ sub g_auto_install(;$) {
exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentification printer mouse netc timezone superuser intf keyboard mkbootdisk base users installClass partitioning); #- TODO modules bootloader
- local $o->{partitioning}{clearall} = 1;
+#- local $o->{partitioning}{clearall} = 1;
$_ = { %{$_ || {}} }, delete @$_{qw(oldu oldg password password2)} foreach $o->{superuser}, @{$o->{users} || []};
@@ -391,3 +374,7 @@ sub pkg_install {
pkgs::install($o->{prefix}, [ $p ]);
}
+sub fsck_option() {
+ my $y = $::o->{security} < 4 && $::beginner && " -y";
+ substInFile { s/("fsck)( -y)?/$1$y/ } "$::o->{prefix}/etc/rc.d/rc.sysinit";
+}
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 1224d8a83..5cffd1d75 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -407,6 +407,8 @@ sub miscellaneous {
TYPE => $o->{installClass},
SECURITY => $o->{security},
});
+ setVarsInSh ("$o->{prefix}/etc/profile.d/proxy.sh", $o->{miscellaneous}, qw(http_proxy ftp_proxy));
+ setVarsInCsh("$o->{prefix}/etc/profile.d/proxy.csh", $o->{miscellaneous}, qw(http_proxy ftp_proxy));
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 9ce06b229..4049d1967 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -49,6 +49,7 @@ sub kill_action {
#------------------------------------------------------------------------------
sub selectLanguage($) {
my ($o) = @_;
+
$o->{lang} =
lang::text2lang($o->ask_from_list("Language",
_("Which language do you want?"),
@@ -307,7 +308,7 @@ such as ``mybox.mylab.myco.com''.
You may also enter the IP address of the gateway if you have one"),
[_("Host name:"), _("DNS server:"), _("Gateway:"), !$::beginner ? _("Gateway device:") : ()],
[(map { \$netc->{$_}} qw(HOSTNAME dnsServer GATEWAY)),
- {val => \$netc->{GATEWAYDEV}, list => \@devices}]
+ {val => \$netc->{GATEWAYDEV}, list => \@devices}]
);
}
@@ -530,11 +531,12 @@ sub setRootPassword($) {
$o->{security} < 2 or
$o->ask_from_entries_ref([_("Set root password"), _("Ok"), _("No password")],
_("Set root password"),
- [_("Password:"), _("Password (again):"), $o->{installClass} eq "server" || $::expert ? (_("Use shadow file"), _("Use MD5 passwords")) : () ],
+ [_("Password:"), _("Password (again):"), $o->{installClass} eq "server" || $::expert ? (_("Use shadow file"), _("Use MD5 passwords")) : (), $::beginner ? () : _("Use NIS") ],
[{ val => \$sup->{password}, hidden => 1 },
{ val => \$sup->{password2}, hidden => 1 },
{ val => \$o->{authentification}{shadow}, type => 'bool', text => _("shadow") },
{ val => \$o->{authentification}{md5}, type => 'bool', text => _("MD5") },
+ { val => \$o->{authentification}{NIS}, type => 'bool', text => _("yellow pages") },
],
complete => sub {
$sup->{password} eq $sup->{password2} or $o->ask_warn('', [ _("The passwords do not match"), _("Please try again") ]), return (1,1);
@@ -757,11 +759,21 @@ sub miscellaneous {
_("Miscellaneous questions"),
[ _("Do you have a laptop?"),
_("Use hard drive optimizations"),
- _("Security level") ],
+ _("Security level"),
+ _("HTTP proxy"),
+ _("FTP proxy"),
+ ],
[ { val => \$u->{LAPTOP}, type => 'bool' },
{ val => \$u->{HDPARM}, type => 'bool', text => _("(may cause disk problems)") },
{ val => \$s, list => [ map { $l{$_} } ikeys %l ] },
+ \$u->{http_proxy},
+ \$u->{ftp_proxy},
],
+ complete => sub {
+ $u->{http_proxy} =~ m,^($|http://), or $o->ask_warn('', _("Proxy should be http://...")), return 1,3;
+ $u->{ftp_proxy} =~ m,^($|ftp://), or $o->ask_warn('', _("Proxy should be ftp://...")), return 1,4;
+ 0;
+ }
) or return;
my %m = reverse %l; $o->{security} = $m{$s};
$o->SUPER::miscellaneous;
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 85840438e..381b2546f 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -47,7 +47,7 @@ sub ask_from_listW {
$defW->grab_focus if $defW;
$w->main;
} else {
- $w->_ask_from_list($messages, $l, $def);
+ $w->_ask_from_list($title, $messages, $l, $def);
$w->main;
}
}
@@ -56,16 +56,17 @@ sub ask_many_from_list_refW($$$$$) {
my ($o, $title, $messages, $list, $val) = @_;
my $n = 0;
my $w = my_gtk->new('', %$o);
+ my $box = gtkpack(new Gtk::VBox(0,0),
+ map {
+ my $nn = $n++;
+ my $o = Gtk::CheckButton->new($_);
+ $o->set_active(${$val->[$nn]});
+ $o->signal_connect(clicked => sub { invbool \${$val->[$nn]} });
+ $o;
+ } @$list);
gtkadd($w->{window},
gtkpack_(create_box_with_title($w, @$messages),
- 1, gtkset_usize(createScrolledWindow(gtkpack(new Gtk::VBox(0,0),
- map {
- my $nn = $n++;
- my $o = Gtk::CheckButton->new($_);
- $o->set_active(${$val->[$nn]});
- $o->signal_connect(clicked => sub { invbool \${$val->[$nn]} });
- $o;
- } @$list)), 0, @$list > 11 ? 250 : @$list * 260 / 11 + 10),
+ 1, @$list > 11 ? gtkset_usize(createScrolledWindow($box), 0, 250) : $box,
0, $w->create_okcancel,
)
);
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index ffa6d9ff4..fd296ef0f 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -9,7 +9,7 @@ use strict;
#-######################################################################################
use common qw(:common :system :file);
use run_program;
-use install_any;
+use commands;
use log;
use c;
@@ -141,11 +141,11 @@ sub setup($) {
my ($keyboard) = @_;
my $o = $keyboards{$keyboard} or return;
- if (my $file = install_any::install_cpio("/usr/share/keymaps", "$o->[1].kmap")) {
+ if (my $file = commands::install_cpio("/usr/share/keymaps", "$o->[1].kmap")) {
log::l("loading keymap $o->[1]");
load(cat_($file)) if -e $file;
}
- if (my $file = install_any::install_cpio("/usr/share/xmodmap", "xmodmap.$keyboard")) {
+ if (my $file = commands::install_cpio("/usr/share/xmodmap", "xmodmap.$keyboard")) {
eval { run_program::run('xmodmap', $file) } unless $::testing;
}
}
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index eb39c2644..991eb1c73 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -8,7 +8,6 @@ use strict;
#-######################################################################################
use common qw(:file);
use commands;
-use install_any;
use log;
#-######################################################################################
@@ -149,7 +148,7 @@ sub set {
delete $ENV{LC_ALL};
delete $ENV{LINGUAS};
}
- install_any::install_cpio("/usr/share/locale", $lang);
+ commands::install_cpio("/usr/share/locale", $lang);
}
sub write {
@@ -187,7 +186,11 @@ sub load_po($) {
$s .= "package po::I18N;\n";
$s .= "\%$lang = (";
- my $f; -e ($f = "$_/po/$lang.po") and last foreach @INC;
+ my $f; -e ($f = "$_/po/$lang.po") and last foreach @INC;
+ unless (-e $f) {
+ -e ($f = "$_") and last foreach @INC;
+ $f = commands::install_cpio("$f/po", "$lang.po");
+ }
local *F; open F, $f or return;
foreach (<F>) {
/^msgstr/ and $state = 1;
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index f349599f5..1a80ef560 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -430,7 +430,7 @@ sub ask_warn { my $w = my_gtk->new(shift @_); $w->_ask_warn(@_); main($w);
sub ask_yesorno { my $w = my_gtk->new(shift @_); $w->_ask_okcancel(@_, _("Yes"), _("No")); main($w); }
sub ask_okcancel { my $w = my_gtk->new(shift @_); $w->_ask_okcancel(@_, _("Is this correct?"), _("Ok"), _("Cancel")); main($w); }
sub ask_from_entry { my $w = my_gtk->new(shift @_); $w->_ask_from_entry(@_); main($w); }
-sub ask_from_list { my $w = my_gtk->new(shift @_); $w->_ask_from_list(@_); main($w); }
+sub ask_from_list { my $w = my_gtk->new($_[0]); $w->_ask_from_list(@_); main($w); }
sub ask_file { my $w = my_gtk->new(''); $w->_ask_file(@_); main($w); }
sub _ask_from_entry($$@) {
@@ -448,8 +448,9 @@ sub _ask_from_entry($$@) {
$entry->grab_focus();
}
-sub _ask_from_list($$$$) {
- my ($o, $messages, $l, $def) = @_;
+sub _ask_from_list {
+ my ($o, $title, $messages, $l, $def) = @_;
+ my (undef, @okcancel) = ref $title ? @$title : $title;
my $list = new Gtk::CList(1);
my ($first_time, $starting_word, $start_reg) = (1, '', "^");
my (@widgets, $timeout, $curr);
@@ -461,7 +462,6 @@ sub _ask_from_list($$$$) {
$list->moveto($_[0], 0, 0.5, 0);
};
- $list->signal_connect(button_release_event => $leave);
$list->signal_connect(select_row => sub {
my ($w, $row, undef, $e) = @_;
$curr = $row;
@@ -500,10 +500,16 @@ sub _ask_from_list($$$$) {
1;
});
$list->set_selection_mode('browse');
+ $list->set_column_auto_resize(0, 1);
+ $o->{ok_clicked} = $leave;
+ $o->{cancel_clicked} = sub { die "ask_from_list cancel" };
gtkadd($o->{window},
gtkpack($o->create_box_with_title(@$messages),
- @$l > 15 ? gtkset_usize(createScrolledWindow($list), 200, 280) : $list));
+ gtkpack_(new Gtk::VBox(0,7),
+ 1, @$l > 15 ? gtkset_usize(createScrolledWindow($list), 200, 280) : $list,
+ @okcancel || !ref $title ? (0, create_okcancel($o, @okcancel)) : ())
+ ));
$o->sync; #- otherwise the moveto is not done
map_index {
diff --git a/perl-install/share/list b/perl-install/share/list
index 2fe5262e3..a5ab91b05 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -1,15 +1,16 @@
-/bin/ash
/bin/cpio
/lib/libnss_nis.so.2
/lib/libnss_files.so.2
/lib/libnss_dns.so.2
/lib/libresolv.so.2
/etc/protocols
+/sbin/fdisk
/sbin/insmod
/sbin/rmmod
/sbin/mkdosfs
/sbin/mke2fs
/usr/bin/bzip2
+/usr/bin/zsh
/usr/lib/perl5/5.00503/AutoLoader.pm
/usr/lib/perl5/5.00503/Carp.pm
/usr/lib/perl5/5.00503/Data/Dumper.pm
@@ -18,10 +19,7 @@
/usr/lib/perl5/5.00503/SelectSaver.pm
/usr/lib/perl5/5.00503/SelfLoader.pm
/usr/lib/perl5/5.00503/Symbol.pm
-/usr/lib/perl5/5.00503/Term/Cap.pm
-/usr/lib/perl5/5.00503/Term/ReadLine.pm
/usr/lib/perl5/5.00503/Time/Local.pm
-/usr/lib/perl5/5.00503/diagnostics.pm
/usr/lib/perl5/5.00503/dumpvar.pl
/usr/lib/perl5/5.00503/i386-linux/Config.pm
/usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm
@@ -45,8 +43,6 @@
/usr/lib/perl5/5.00503/i386-linux/syscall.ph
/usr/lib/perl5/5.00503/lib.pm
/usr/lib/perl5/5.00503/overload.pm
-/usr/lib/perl5/5.00503/perl5db.pl
-/usr/lib/perl5/5.00503/pod/perldiag.pod
/usr/lib/perl5/5.00503/strict.pm
/usr/lib/perl5/5.00503/vars.pm
/usr/lib/perl5/site_perl/5.005/i386-linux/Gtk.pm