summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakboot
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-09-06 08:34:36 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-09-06 08:34:36 +0000
commitb98ca14e716ebf7b5ec7d117bd05a9cf4cc162bd (patch)
tree939e3da2a65718b2fe1fbd5662c55b395eafc595 /perl-install/standalone/drakboot
parent40b9e49c8946a858a1848736a025bbd7c832a443 (diff)
downloaddrakx-b98ca14e716ebf7b5ec7d117bd05a9cf4cc162bd.tar
drakx-b98ca14e716ebf7b5ec7d117bd05a9cf4cc162bd.tar.gz
drakx-b98ca14e716ebf7b5ec7d117bd05a9cf4cc162bd.tar.bz2
drakx-b98ca14e716ebf7b5ec7d117bd05a9cf4cc162bd.tar.xz
drakx-b98ca14e716ebf7b5ec7d117bd05a9cf4cc162bd.zip
ensure we do not enable autologin w/o any user
Diffstat (limited to 'perl-install/standalone/drakboot')
-rwxr-xr-xperl-install/standalone/drakboot9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index f85dc9ec3..a2d8f6b15 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -80,7 +80,14 @@ unless ($::isEmbedded) {
my @users = sort(list_users());
my @sessions = sort(split(' ', `/usr/sbin/chksession -l`));
-my $user_combo = Gtk2::ComboBox->new_with_strings(\@users, if_(member($auto_mode->{autologin}, @users), $auto_mode->{autologin}));
+
+my $user = member($auto_mode->{autologin}, @users) ? $auto_mode->{autologin} : $users[0];
+if (!$user) {
+ # no user, bad but add root anyway:
+ $user = "root";
+ push @users, $user;
+}
+my $user_combo = Gtk2::ComboBox->new_with_strings(\@users, $user);
my $desktop_combo = Gtk2::ComboBox->new_with_strings(\@sessions, if_(member($auto_mode->{desktop}, @sessions), $auto_mode->{desktop}));
my %themes = ('path' => '/usr/share/bootsplash/themes/',