diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-09-01 07:14:59 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-09-01 07:14:59 +0000 |
commit | 15b49fd92914a74829709f76b6134ecfbfab408c (patch) | |
tree | 99e4354cee577b4fb7df1da41fe77f50dacd7a3c | |
parent | b66b137b87ee2be6115f288397fae89979291218 (diff) | |
download | drakx-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
-rwxr-xr-x | perl-install/standalone/drakboot | 6 |
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', |