diff options
author | Daouda Lo <daouda@mandriva.com> | 2001-02-28 04:04:59 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2001-02-28 04:04:59 +0000 |
commit | 3b0f6b57e8f0bdf8210fe882a17db778041ce60b (patch) | |
tree | be0568fe3c3a65a7fb86b42659667123c10b2583 /perl-install | |
parent | f10135f75069699597108bdb6b158e0f7330b970 (diff) | |
download | drakx-3b0f6b57e8f0bdf8210fe882a17db778041ce60b.tar drakx-3b0f6b57e8f0bdf8210fe882a17db778041ce60b.tar.gz drakx-3b0f6b57e8f0bdf8210fe882a17db778041ce60b.tar.bz2 drakx-3b0f6b57e8f0bdf8210fe882a17db778041ce60b.tar.xz drakx-3b0f6b57e8f0bdf8210fe882a17db778041ce60b.zip |
* add real users for autologin .
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootlook.pm | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm index 062f9add8..1755b095b 100644 --- a/perl-install/bootlook.pm +++ b/perl-install/bootlook.pm @@ -25,10 +25,11 @@ use Config; init Gtk; use POSIX; use Locale::GetText; +use any; my $path_to_pixmaps = "/usr/share/libDrakX/pixmaps/"; setlocale (LC_ALL, ""); -Locale::GetText::textdomain ("c'est ton boot !"); +Locale::GetText::textdomain ("Drakboot"); import Locale::GetText I_; *_ = *I_; @@ -44,6 +45,7 @@ local $_ = join '', @ARGV; /-h/ and die _("no help implemented yet.\n"); +my @users; my $x_mode = isXlaunched(); my $a_mode = (-e "/etc/aurora/Monitor") ? 1 : 0; my $l_mode = isAutologin(); @@ -168,12 +170,15 @@ $x_box->pack_start($x_no_button, 0, 0, 0); my $user_dedans = new Gtk::HBox( 0, 10 ); $user_dedans->border_width (0); -my $x_yes_button = new Gtk::RadioButton _("yes, I want autologin with this user"), $x_no_button; +my $x_yes_button = new Gtk::RadioButton _("yes, I want autologin with this (user, desktop)"), $x_no_button; $x_yes_button->set_active($l_mode); my $user_combo = new Gtk::Combo; -$user_combo->set_popdown_strings("you", "me", "rms", "linus"); +\&parse_etc_passwd; +$user_combo->set_popdown_strings(@users); +my $desktop_combo = new Gtk::Combo; $user_dedans->pack_start($x_yes_button, 0, 0, 0); $user_dedans->pack_start($user_combo, 0, 0, 0); +$user_dedans->pack_start($desktop_combo, 0, 0, 0); $x_box->pack_start ($user_dedans, 0, 0, 0); ($x_mode) ? $x_box->set_sensitive(1) : $x_box->set_sensitive(0); @@ -212,6 +217,22 @@ if ($a_mode) { } main Gtk; +#------------------------------------------------------------- +# get user names to put in combo +#------------------------------------------------------------- + +sub parse_etc_passwd +{ + setpwent(); + do { + @user_info = getpwent(); + my ($uname, $uid) = @user_info[0,2]; + print "$user_info[0]"; + if ($uid == 0 || $uid >500){ + push (@users, $uname); + } + } while (@user_info); +} #------------------------------------------------------------- # menu callback functions |