summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfigurator.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-09-05 14:21:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-09-05 14:21:48 +0000
commit44b596453c50044debba901575eb015045ae845d (patch)
tree478ad04ac879df73742947911a123b2e7bd82652 /perl-install/Xconfigurator.pm
parent25365fea641e9e5bcec2372695c9438d099b78eb (diff)
downloaddrakx-backup-do-not-use-44b596453c50044debba901575eb015045ae845d.tar
drakx-backup-do-not-use-44b596453c50044debba901575eb015045ae845d.tar.gz
drakx-backup-do-not-use-44b596453c50044debba901575eb015045ae845d.tar.bz2
drakx-backup-do-not-use-44b596453c50044debba901575eb015045ae845d.tar.xz
drakx-backup-do-not-use-44b596453c50044debba901575eb015045ae845d.zip
no_comment
Diffstat (limited to 'perl-install/Xconfigurator.pm')
-rw-r--r--perl-install/Xconfigurator.pm25
1 files changed, 14 insertions, 11 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index cbe6e98d8..6c4dadbd4 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -1110,21 +1110,24 @@ Would you like X to start when you reboot?"), 1);
my %l; @l{@etc_pass_fields} = split ':';
$l{uid} > 500, $l{name};
} cat_("$o->{prefix}/etc/passwd");
- my $cmd = $prefix ? "chroot $prefix" : "";
- my @wm = map { lc } (split (' ', `$cmd /usr/sbin/chksession -l`));
- my $flag='no';
- unless (exists $o->{miscellaneous}{autologuser} || $::auto || !@users || $o->{authentication}{NIS}) {
+
+ unless ($::auto || !@users || $o->{authentication}{NIS}) {
+ my $cmd = $prefix ? "chroot $prefix" : "";
+ my @wm = map { lc } (split (' ', `$cmd /usr/sbin/chksession -l`));
+
+ my %l = getVarsFromSh("$prefix/etc/sysconfig/autologin");
+ $o->{autologin} ||= $l{USER};
+
$in->ask_from_entries_refH(_("Autologin"),
_("I can set up your computer to automatically log on one user.
If you don't want to use this feature, click on the cancel button."),
- [ _("Choose the default user:") => { val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1},
- _("Choose the window_manager to run:") => { val => \$o->{miscellaneous}{autologwm}, list => \@wm, not_edit => 1}, ])
- ? do { $flag='yes';
- $::isStandalone ? system("urpmi --auto autologin") : $o->pkg_install("autologin");
- } : delete $o->{miscellaneaous}{autologuser};
+ [ _("Choose the default user:") => { val => \$o->{autologin}, list => \@users },
+ _("Choose the window_manager to run:") => { val => \$o->{desktop}, list => \@wm }, ]) or delete $o->{autologin};
+ }
+ if ($o->{autologin}) {
+ $::isStandalone ? system("urpmi --auto autologin") : $o->pkg_install("autologin");
+ any::setAutologin($prefix, $o->{autologin}, $o->{desktop});
}
- any::setAutologin($prefix, $o->{miscellaneous}{autologuser}, $o->{miscellaneous}{autologwm}, "/usr/X11R6/bin/startx", $flag);
-
run_program::rooted($prefix, "chkconfig", "--del", "gpm") if $o->{mouse}{device} =~ /ttyS/ && !$::isStandalone;
}
}