From 21f753634113afa55eda54a495017c5eef8fc462 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 20 Jul 2000 00:28:02 +0000 Subject: no_comment --- perl-install/Xconfigurator.pm | 49 ++++++++++++------------------- perl-install/common.pm | 12 +++++++- perl-install/install2.pm | 6 ++-- perl-install/install_steps_gtk.pm | 2 +- perl-install/install_steps_interactive.pm | 5 ++++ perl-install/modules.pm | 2 +- 6 files changed, 39 insertions(+), 37 deletions(-) diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index da65dda90..f2cb51bcf 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -1020,35 +1020,22 @@ _("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; - if ($o->{miscellaneous}{autologin} || $::auto || $in->ask_yesorno(_("Autologin at startup"), - _("I can set up your computer to automatically log on one user. -Would you like to use this feature?"), 1)) - { - $o->{miscellaneous}{autologin}=1; - my @users; - my @etc_pass_fields = qw(name pw uid gid realname home shell); - my @lines = cat_(my $f = "$o->{prefix}/etc/passwd") or log::l("missing passwd file"), return; - foreach (@lines) { - my %l; @l{@etc_pass_fields} = split ':'; - if ($l{"uid"} > 500) { - push @users, $l{"name"}; - } - } - if ( $in->ask_from_entries_refH( - [ _("Autologin"), _("Ok"), _("Cancel") ], - _("Autologin - Choose default user\n"), - [ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ], - complete => sub { - $o->{miscellaneous}{autologuser} or $in->ask_warn('', _("Please choose a user in the list")), return (1,0); - return 0; - } - )) - { - $o->{miscellaneous}{autologin}=1; - } - else { $o->{miscellaneous}{autologin}=0; } - } - } + my @etc_pass_fields = qw(name pw uid gid realname home shell); + my @users = mapgrep { + my %l; @l{@etc_pass_fields} = split ':'; + $l{uid} > 500, $l{name}; + } cat_("$o->{prefix}/etc/passwd"); + + if (exists $o->{miscellaneous}{autologin} || $::auto || @users + || $in->ask_yesorno(_("Autologin at startup"), +_("I can set up your computer to automatically log on one user. +Would you like to use this feature?"), 1)) { + $o->{miscellaneous}{autologin} = $in->ask_from_entries_refH(_("Autologin"), + _("Autologin - Choose default user\n"), + [ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ], + ); + } + } run_program::rooted($prefix, "chkconfig", "--del", "gpm") if $o->{mouse}{device} =~ /ttyS/ && !$::isStandalone; - } - } + } +} diff --git a/perl-install/common.pm b/perl-install/common.pm index cbbc79ff2..1ad2f85b1 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -7,7 +7,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int @ISA = qw(Exporter); %EXPORT_TAGS = ( common => [ qw(__ even odd arch better_arch compat_arch min max sqr sum and_ or_ sign product bool invbool listlength bool2text bool2yesno 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 deref) ], - functional => [ qw(fold_left compose map_index grep_index map_each grep_each list2kv map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie combine) ], + functional => [ qw(fold_left compose mapgrep map_index grep_index map_each grep_each list2kv map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie combine) ], file => [ qw(dirname basename touch all glob_ cat_ output symlinkf chop_ mode typeFromMagic expand_symlinks) ], system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInCsh substInFile availableRam availableMemory removeXiBSuffix template2file formatTime unix2dos setVirtual) ], constant => [ qw($printable_chars $sizeof_int $bitof_int $SECTORSIZE %compat_arch) ], @@ -156,6 +156,16 @@ sub touch { utime $now, $now, $f; } +sub mapgrep(&@) { + my $f = shift; + my @l; + foreach (@_) { + my ($b, $v) = $f->($_); + push @l, $v if $b; + } + @l; +} + sub map_index(&@) { my $f = shift; my @v; local $::i = 0; diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 9bbad4da8..633b46eb3 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -721,9 +721,6 @@ sub main { last if $o->{step} eq 'exitInstall'; } - #- mainly for auto_install's - run_program::rooted($o->{prefix}, "sh", "-c", $o->{postInstall}) if $o->{postInstall}; - install_any::clean_postinstall_rpms(); install_any::ejectCdrom(); @@ -742,6 +739,9 @@ sub main { -e "$o->{prefix}/usr/bin/urpmi" or eval { commands::rm("-rf", "$o->{prefix}/var/lib/urpmi") }; + #- mainly for auto_install's + run_program::rooted($o->{prefix}, "sh", "-c", $o->{postInstall}) if $o->{postInstall}; + #- have the really bleeding edge ddebug.log eval { commands::cp('-f', "/tmp/ddebug.log", "$o->{prefix}/root") }; diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 74cae0157..8894f72ff 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -97,7 +97,7 @@ sub new($$) { my $prog = /Xsun/ || /Xpmac/ ? $_ : "XF86_$_"; unless (-x "$dir/$prog") { unlink $_ foreach glob_("$dir/X*"); - install_any::getAndSaveFile("$dir/$prog", "$dir/$prog") or die "failed to get server: $!"; + install_any::getAndSaveFile("$dir/$prog", "$dir/$prog") or die "failed to get server $prog: $!"; chmod 0755, "$dir/$prog"; } if (/FB/) { diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 91abcdc20..38dff712e 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -169,6 +169,11 @@ sub selectMouse { } $o->setup_thiskind('SERIAL_USB', !$::expert, 0) if $o->{mouse}{device} eq "usbmouse"; + eval { + devices::make("usbmouse"); + modules::load("usbmouse"); + modules::load("mousedev"); + } if $o->{mouse}{device} eq "usbmouse"; $o->SUPER::selectMouse; } diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 05a1bb8d6..bb6cd2216 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -139,7 +139,7 @@ arch() =~ /^sparc/ ? ( "sd_mod" => "sd_mod", "ide-mod" => "ide-mod", "ide-probe" => "ide-probe", - "ide-probe-mod" => "ide-probe-mod", +#- "ide-probe-mod" => "ide-probe-mod", }], [ 'disk', { arch() =~ /^sparc/ ? ( -- cgit v1.2.1