summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-07-19 16:38:58 +0000
committerdamien <damien@mandriva.com>2000-07-19 16:38:58 +0000
commitc4f585e00b19bd5e07208572e10ea005a3e47996 (patch)
treeb6a1289d010b0ac49a353368e4f6de0c12c33264 /perl-install
parent0d15d7fceccfef8ac44cb50e00fbbc8c722df053 (diff)
downloaddrakx-c4f585e00b19bd5e07208572e10ea005a3e47996.tar
drakx-c4f585e00b19bd5e07208572e10ea005a3e47996.tar.gz
drakx-c4f585e00b19bd5e07208572e10ea005a3e47996.tar.bz2
drakx-c4f585e00b19bd5e07208572e10ea005a3e47996.tar.xz
drakx-c4f585e00b19bd5e07208572e10ea005a3e47996.zip
added autologin boxes.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog6
-rw-r--r--perl-install/Xconfigurator.pm32
2 files changed, 36 insertions, 2 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 6ca69d482..12190b7cc 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,9 @@
+2000-07-19 dam's <damien@mandrakesoft.com>
+
+ * Xconfigurator.pm: added autologin boxes.
+ result is in {miscellaneous}{autologin} and in
+ {miscellaneous}{autologuser}
+
2000-07-19 François Pons <fpons@mandrakesoft.com>
* any.pm: added default root to existing root device when adding
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index c69a3c477..e249c39e5 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -1018,9 +1018,37 @@ sub main {
my $run = exists $o->{xdm} ? $o->{xdm} : $::auto || $in->ask_yesorno(_("X at startup"),
_("I can set up your computer to automatically start X upon booting.
Would you like X to start when you reboot?"), 1);
-
rewriteInittab($run ? 5 : 3) unless $::testing;
- }
+
+ $in->set_help('configureXautologin') unless $::isStandalone;
+ if ($o->{miscellaneous}{autologin} || $::auto || $in->ask_yesorno(_("Autologin at startup"),
+ _("I can set up your computer to automatically log on one user.
+Would you like to use this feature?"), 1))
+ {
+ $o->{miscellaneous}{autologin}=1;
+ my @users;
+ my @etc_pass_fields = qw(name pw uid gid realname home shell);
+ my @lines = cat_(my $f = "$o->{prefix}/etc/passwd") or log::l("missing passwd file"), return;
+ foreach (@lines) {
+ my %l; @l{@etc_pass_fields} = split ':';
+ if ($l{"uid"} > 500) {
+ push @users, $l{"name"};
+ }
+ }
+ if ( $in->ask_from_entries_refH(
+ [ _("Autologin"), _("Ok"), _("Cancel") ],
+ _("Autologin - Choose default user\n"),
+ [ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ],
+ complete => sub {
+ $o->{miscellaneous}{autologuser} or $in->ask_warn('', _("Please choose a user in the list")), return (1,0);
+ return 0;
+ }
+ ))
+ {
+ $o->{miscellaneous}{autologin}=1;
+ }
+ else { $o->{miscellaneous}{autologin}=0; }
+ }
run_program::rooted($prefix, "chkconfig", "--del", "gpm") if $o->{mouse}{device} =~ /ttyS/ && !$::isStandalone;
}
}