summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/any.pm26
-rw-r--r--perl-install/install/steps.pm9
-rwxr-xr-xperl-install/standalone/drakboot9
-rwxr-xr-xperl-install/standalone/finish-install7
4 files changed, 29 insertions, 22 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 03ebd3c76..5cf721578 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -671,34 +671,34 @@ sub get_autologin() {
}
sub set_autologin {
- my ($do_pkgs, $o_user, $o_wm) = @_;
- log::l("set_autologin $o_user $o_wm");
- my $autologin = bool2text($o_user);
+ my ($do_pkgs, $autologin) = @_;
+ log::l("set_autologin $autologin->{user} $autologin->{desktop}");
+ my $do_autologin = bool2text($autologin->{user});
#- Configure KDM / MDKKDM
eval { common::update_gnomekderc_no_create(common::read_alternative('kdm4-config'), 'X-:0-Core' => (
- AutoLoginEnable => $autologin,
- AutoLoginUser => $o_user,
+ AutoLoginEnable => $do_autologin,
+ AutoLoginUser => $autologin->{user},
)) };
#- Configure GDM
eval { update_gnomekderc("$::prefix/etc/X11/gdm/custom.conf", daemon => (
- AutomaticLoginEnable => $autologin,
- AutomaticLogin => $o_user,
+ AutomaticLoginEnable => $do_autologin,
+ AutomaticLogin => $autologin->{user},
)) };
my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin";
- if (member($o_wm, 'KDE', 'KDE4', 'GNOME')) {
+ if (member($autologin->{desktop}, 'KDE', 'KDE4', 'GNOME')) {
unlink $xdm_autologin_cfg;
} else {
- $do_pkgs->ensure_is_installed('autologin', '/usr/bin/startx.autologin') if $o_user;
+ $do_pkgs->ensure_is_installed('autologin', '/usr/bin/startx.autologin') if $autologin->{user};
setVarsInShMode($xdm_autologin_cfg, 0644,
- { USER => $o_user, AUTOLOGIN => bool2yesno($o_user), EXEC => '/usr/bin/startx.autologin' });
+ { USER => $autologin->{user}, AUTOLOGIN => bool2yesno($autologin->{user}), EXEC => '/usr/bin/startx.autologin' });
}
- if ($o_user) {
- my $home = (getpwnam($o_user))[7];
- set_window_manager($home, $o_wm);
+ if ($autologin->{user}) {
+ my $home = (getpwnam($autologin->{user}))[7];
+ set_window_manager($home, $autologin->{desktop});
}
}
sub set_window_manager {
diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm
index 4c7d058e2..adc63d74f 100644
--- a/perl-install/install/steps.pm
+++ b/perl-install/install/steps.pm
@@ -721,11 +721,12 @@ sub addUser {
any::add_users($users, $o->{authentication});
- if ($o->{autologin}) {
- $o->{desktop} ||= first(any::sessions());
- $o->pkg_install("autologin") if !member($o->{desktop}, 'KDE', 'KDE4', 'GNOME');
+ my $autologin = { user => $o->{autologin}, desktop => $o->{desktop} };
+ if ($autologin->{user}) {
+ $autologin->{desktop} ||= first(any::sessions());
+ $o->pkg_install("autologin") if !member($autologin->{desktop}, 'KDE', 'KDE4', 'GNOME');
}
- any::set_autologin($o->do_pkgs, $o->{autologin}, $o->{desktop});
+ any::set_autologin($o->do_pkgs, $autologin);
install::any::disable_user_view() if @$users == ();
}
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index cb77da9f1..0cce1384e 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -224,10 +224,13 @@ sub autologin_choice() {
Xconfig::various::runlevel($x_mode ? 5 : 3);
$::testing and return;
if ($auto_buttons[1]->get_active) {
- any::set_autologin($in->do_pkgs, $user_combo->entry->get_text, $desktop_combo->entry->get_text);
+ $auto_mode->{user} = $user_combo->entry->get_text;
+ $auto_mode->{desktop} = $desktop_combo->entry->get_text;
} else {
- any::set_autologin($in->do_pkgs);
- }
+ $auto_mode->{user} = undef;
+ $auto_mode->{desktop} = undef;
+ }
+ any::set_autologin($in->do_pkgs, $auto_mode);
});
}
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index d715e8c8d..c8cd43096 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -149,8 +149,11 @@ sub ask_users() {
set_authentication($superuser) or goto &ask_users;
}
any::add_users($users, $authentication);
- any::set_autologin($in->do_pkgs, $users->[0]{name}, $autologin_first)
- if $autologin_first;
+ if ($autologin_first) {
+ $autologin->{user} = $users->[0]{name};
+ $autologin->{desktop} = $autologin_first;
+ any::set_autologin($in->do_pkgs, $autologin);
+ }
my $finit_conf = "/etc/finit.conf";
substInFile {
s/^user .*//;