summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-04-05 16:42:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-04-05 16:42:07 +0000
commit935a1aab74f854bfb013be5957d1eb8ef22a7401 (patch)
tree839b11fc7c26d77d49a32192c3e38e55db1300e5 /perl-install/any.pm
parent98bba942b18c2b44f8261f3463ab023bc7c23814 (diff)
downloaddrakx-935a1aab74f854bfb013be5957d1eb8ef22a7401.tar
drakx-935a1aab74f854bfb013be5957d1eb8ef22a7401.tar.gz
drakx-935a1aab74f854bfb013be5957d1eb8ef22a7401.tar.bz2
drakx-935a1aab74f854bfb013be5957d1eb8ef22a7401.tar.xz
drakx-935a1aab74f854bfb013be5957d1eb8ef22a7401.zip
(autologin): fix
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index f20f84165..42d7f4283 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -755,12 +755,13 @@ sub autologin {
my $cmd = $prefix ? "chroot $prefix" : "";
my @wm = (split (' ', `$cmd /usr/sbin/chksession -l`));
+ my @users = map { $_->{name} } @{$o->{users} || []};
- if (@wm && !is_empty_array_ref($o->{users}) && !$o->{authentication}{NIS} && $ENV{SECURE_LEVEL} <= 3) {
+ if (@wm && @users && !$o->{authentication}{NIS} && $ENV{SECURE_LEVEL} <= 3) {
$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."),
- [ { label => _("Choose the default user:"), val => \$o->{autologin}, list => [ '', @{$o->{users}} ] },
+ [ { label => _("Choose the default user:"), val => \$o->{autologin}, list => [ '', @users ] },
{ label => _("Choose the window manager to run:"), val => \$o->{desktop}, list => \@wm }, ]) or delete $o->{autologin};
}
}