From 15b49fd92914a74829709f76b6134ecfbfab408c Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 1 Sep 2004 07:14:59 +0000 Subject: do not crash if default autologin or default desktop doesn't exist --- perl-install/standalone/drakboot | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'perl-install/standalone/drakboot') 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', -- cgit v1.2.1