summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakboot
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-09-01 07:14:59 +0000
committerOlivier Blin <oblin@mandriva.org>2004-09-01 07:14:59 +0000
commit15b49fd92914a74829709f76b6134ecfbfab408c (patch)
tree99e4354cee577b4fb7df1da41fe77f50dacd7a3c /perl-install/standalone/drakboot
parentb66b137b87ee2be6115f288397fae89979291218 (diff)
downloaddrakx-15b49fd92914a74829709f76b6134ecfbfab408c.tar
drakx-15b49fd92914a74829709f76b6134ecfbfab408c.tar.gz
drakx-15b49fd92914a74829709f76b6134ecfbfab408c.tar.bz2
drakx-15b49fd92914a74829709f76b6134ecfbfab408c.tar.xz
drakx-15b49fd92914a74829709f76b6134ecfbfab408c.zip
do not crash if default autologin or default desktop doesn't exist
Diffstat (limited to 'perl-install/standalone/drakboot')
-rwxr-xr-xperl-install/standalone/drakboot6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index b4bdb4de1..f85dc9ec3 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -78,8 +78,10 @@ unless ($::isEmbedded) {
######### menus end
}
-my $user_combo = Gtk2::ComboBox->new_with_strings([ sort(list_users()) ], $auto_mode->{autologin});
-my $desktop_combo = Gtk2::ComboBox->new_with_strings([ sort(split(' ', `/usr/sbin/chksession -l`)) ], $auto_mode->{desktop});
+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 $desktop_combo = Gtk2::ComboBox->new_with_strings(\@sessions, if_(member($auto_mode->{desktop}, @sessions), $auto_mode->{desktop}));
my %themes = ('path' => '/usr/share/bootsplash/themes/',
'sysconfig' => '/etc/sysconfig/bootsplash',