summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfigurator.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-07-20 00:28:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-07-20 00:28:02 +0000
commit21f753634113afa55eda54a495017c5eef8fc462 (patch)
treee017dc86e92d288b17aa7a94479af392da8940f1 /perl-install/Xconfigurator.pm
parent60225ecd25a9879c5484e4d65f2e1c05388010b3 (diff)
downloaddrakx-21f753634113afa55eda54a495017c5eef8fc462.tar
drakx-21f753634113afa55eda54a495017c5eef8fc462.tar.gz
drakx-21f753634113afa55eda54a495017c5eef8fc462.tar.bz2
drakx-21f753634113afa55eda54a495017c5eef8fc462.tar.xz
drakx-21f753634113afa55eda54a495017c5eef8fc462.zip
no_comment
Diffstat (limited to 'perl-install/Xconfigurator.pm')
-rw-r--r--perl-install/Xconfigurator.pm49
1 files changed, 18 insertions, 31 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;
- }
- }
+ }
+}