summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-05 22:54:25 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-05 22:54:25 +0000
commit680a22985ade4719c431cf2c43daed9eafd3bd4e (patch)
treebe13b6cba642cb168425d7de4a19ab934a111af1 /perl-install
parent4b3042e3c70ac231a17c33e0527bf3c2afc2d376 (diff)
downloaddrakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.tar
drakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.tar.gz
drakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.tar.bz2
drakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.tar.xz
drakx-backup-do-not-use-680a22985ade4719c431cf2c43daed9eafd3bd4e.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile2
-rw-r--r--perl-install/Xconfigurator.pm16
-rw-r--r--perl-install/Xconfigurator_consts.pm11
-rw-r--r--perl-install/install2.pm4
-rw-r--r--perl-install/install_steps.pm4
-rw-r--r--perl-install/install_steps_interactive.pm11
-rw-r--r--perl-install/pkgs.pm5
-rw-r--r--perl-install/share/list2
8 files changed, 20 insertions, 35 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 2984950a2..b968863c7 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -124,7 +124,7 @@ get_needed_files: $(DIRS)
fi; \
fi; \
done
- mv -f $(DEST)/lib/libimlib-xpm.so $(DEST)/usr/lib
+ mv -f $(DEST)/lib/libimlib-png.so $(DEST)/usr/lib
mv -f $(DEST)/bin/* $(DEST)/sbin/* $(DEST)/usr/bin
cd $(DEST)/usr/bin ; mv insmod insmod_
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 8c492f542..14aa8ac28 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -113,8 +113,9 @@ sub readMonitorsDB {
sub rewriteInittab {
my ($runlevel) = @_;
- substInFile { s/^(id:)[35](:initdefault:)\s*$/$1$runlevel$2\n/ }
- (grep { -r $_ } "$prefix/etc/inittab" or log::l("missing inittab!!!"), return);
+ my $f = "$prefix/etc/inittab";
+ -r $f or log::l("missing inittab!!!"), return;
+ substInFile { s/^(id:)[35](:initdefault:)\s*$/$1$runlevel$2\n/ } $f;
}
sub keepOnlyLegalModes {
@@ -748,16 +749,5 @@ _("I can set up your computer to automatically start X upon booting.
Would you like X to start when you reboot?"), 1);
rewriteInittab($run ? 5 : 3) unless $::testing;
-
- $in->ask_warn(_("X successfully configured"),
-_("Configuration file has been written. Take a look at it before running 'startx'.
-
-Within the server, press Ctrl, Alt and '+' simultaneously to cycle through video resolutions.
-
-Pressing Ctrl, Alt and Backspace simultaneously immediately exits the server
-
-For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config.
-
-")) unless $::auto;
}
}
diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm
index fd1785c41..f3b6573f7 100644
--- a/perl-install/Xconfigurator_consts.pm
+++ b/perl-install/Xconfigurator_consts.pm
@@ -225,17 +225,6 @@ Before continuing with this program, make sure you know the chipset and
amount of video memory on your video card. SuperProbe can help with this.
It is also helpful if you know what server you want to run.";
-$finalcomment_text = "
-configuration file has been written. Take a look at it before running 'startx'.
-Note that the XF86Config file must be in one of the directories searched by the
-server (e.g. /etc/X11/XF86Config) in order to be used. Within the server press
-ctrl, alt and '+' simultaneously to cycle video resolutions. Pressing ctrl, alt
-and backspace simultaneously immediately exits the server (use if the monitor
-doesn't sync for a particular mode).
-
-For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config.
-";
-
$s3_comment = '
# Use Option "nolinear" if the server doesn\'t start up correctly
# (this avoids the linear framebuffer probe). If that fails try
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 4d6d5102e..3765fb147 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -45,7 +45,7 @@ my @installSteps = (
partitionDisks => [ __("Setup filesystems"), 1, 0, "selectPath" ],
formatPartitions => [ __("Format partitions"), 1, -1, "partitionDisks" ],
choosePackages => [ __("Choose packages to install"), 1, 1, "selectPath" ],
- doInstallStep => [ __("Install system"), 1, -1, ["formatPartitions", "selectPath"] ],
+ doInstallStep => [ __("Install system"), 1, -1 ],
miscellaneous => [ __("Miscellaneous"), 1, 1 ],
configureNetwork => [ __("Configure networking"), 1, 1, "formatPartitions" ],
configureTimezone => [ __("Configure timezone"), 1, 1, "doInstallStep" ],
@@ -153,7 +153,7 @@ $o = $::o = {
str_type => $printer::printer_type_default,
QUEUE => "lp",
SPOOLDIR => "/var/spool/lpd/lp",
- DBENTRY => "DeskJet670",
+ DBENTRY => "PostScript",
PAPERSIZE => "legal",
CRLF => 0,
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 225a0d3c1..ccf47b4c5 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -299,8 +299,9 @@ sub addUser($) {
foreach (glob_("$p/home")) { my ($u, $g) = (stat($_))[4,5]; $uids{$u} = 1; $gids{$g} = 1; }
my @l = @{$o->{users} || []};
+ my %done;
foreach (@l) {
- next if !$_->{name} || getpwnam($_->{name});
+ next if !$_->{name} || getpwnam($_->{name}) || $done{$_->{name}};
my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]);
my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]);
@@ -311,6 +312,7 @@ sub addUser($) {
$_->{uid} = $u;
$_->{gid} = $g;
$_{pw} ||= $_->{password} && install_any::crypt($_->{password});
+ $done{$_->{name}} = 1;
}
my @passwd = cat_("$p/etc/passwd");;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index d027f4d98..e74c78b3c 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -544,8 +544,7 @@ sub setRootPassword($) {
return if $o->{security} < 1 && !$clicked;
- $o->{security} < 1 or
- $o->ask_from_entries_ref([_("Set root password"), _("Ok"), _("No password")],
+ $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")) : (), $::beginner ? () : _("Use NIS") ],
[{ val => \$sup->{password}, hidden => 1 },
@@ -585,7 +584,7 @@ sub addUser($) {
if ($o->{security} < 2 && !$clicked || $o->ask_from_entries_ref(
[ _("Add user"), _("Accept user"), _("Done") ],
- _("Enter a user\n%s", $o->{users} ? _("(already added %s)", join(", ", map { $_->{realname} } @{$o->{users}})) : ''),
+ _("Enter a user\n%s", $o->{users} ? _("(already added %s)", join(", ", map { $_->{realname} || $_->{name} } @{$o->{users}})) : ''),
[ _("Real name"), _("User name"), $o->{security} < 2 ? () : (_("Password"), _("Password (again)")), $::beginner ? () : _("Shell") ],
[ \$u->{realname}, \$u->{name},
{val => \$u->{password}, hidden => 1}, {val => \$u->{password2}, hidden => 1},
@@ -601,6 +600,7 @@ sub addUser($) {
#(length $u->{password} < 6) and $o->ask_warn('', _("This password is too simple")), return (1,2);
$u->{name} or $o->ask_warn('', _("Please give a user name")), return (1,0);
$u->{name} =~ /^[a-z0-9_-]+$/ or $o->ask_warn('', _("The user name must contain only lower cased letters, numbers, `-' and `_'")), return (1,0);
+ member($u->{name}, map { $_->{name} } @{$u->{users}}) and $o->ask_warn('', _("This user name is already added")), return (1,0);
return 0;
},
)) {
@@ -696,7 +696,7 @@ _("Restrict command line options") => { val => \$b->{restricted}, type => "bool"
}
until ($::beginner && $more <= 1) {
- my $c = $o->ask_from_list_('',
+ my $c = $o->ask_from_list_([''],
_("Here are the following entries in LILO.
You can add some more or change the existent ones."),
[ (sort @{[map_each { "$::b->{label} ($::a)" . ($b->{default} eq $::b->{label} && " *") } %{$b->{entries}}]}), __("Add"), __("Done") ],
@@ -802,6 +802,7 @@ sub miscellaneous {
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;
+ $u->{memsize} =~ s/^(\d+)M?$/$1M/ or $o->ask_warn('', _("Give the ram size in Mb")), return 1,6;
0;
}
) || return;
@@ -907,7 +908,7 @@ sub load_thiskind {
#------------------------------------------------------------------------------
sub setup_thiskind {
my ($o, $type, $auto, $at_least_one) = @_;
- my @l = $o->load_thiskind($type) unless $::expert && $o->ask_yesorno('', _("Skip %s PCI probing", $type), 1);
+ my @l = $o->load_thiskind($type) unless $::expert && !$o->ask_yesorno('', _("Try to find PCI devices?"), 1);
return if $auto && (@l || !$at_least_one);
while (1) {
my $msg = @l ?
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 4c49d6a43..53fca5a99 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -21,7 +21,10 @@ hackkernel hackkernel-BOOT hackkernel-fb hackkernel-headers
hackkernel-pcmcia-cs hackkernel-smp hackkernel-smp-fb
);
-sub correctSize { (20471 - $_[0])*$_[0]/16258 } #- size correction in MB.
+my $A = 20471;
+my $B = 16258;
+sub correctSize { ($A - $_[0]) * $_[0] / $B } #- size correction in MB.
+sub invCorrectSize { $A / 2 - sqrt(sqr($A) - 4 * $B * $_[0]) / 2 }
sub Package {
my ($packages, $name) = @_;
diff --git a/perl-install/share/list b/perl-install/share/list
index 959d76371..1368b0c35 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -14,7 +14,7 @@
/usr/bin/zsh
/usr/lib/gtk/themes/engines/libpixmap.so
/usr/lib/gtk/themes/engines/libpixmap.la
-/usr/lib/libimlib-xpm.so
+/usr/lib/libimlib-png.so
/usr/lib/perl5/5.00503/AutoLoader.pm
/usr/lib/perl5/5.00503/Carp.pm
/usr/lib/perl5/5.00503/Data/Dumper.pm