summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-09-23 17:20:18 +0000
committerOlivier Blin <oblin@mandriva.com>2009-09-23 17:20:18 +0000
commit49da0edfe4e11c357d99a157aa739c275da71b34 (patch)
treedaefcfd71b17d5cb5892f56fbfb3b66de80ac746 /perl-install
parenta2f1a38883ce87890bfc9918b908ff0672e05f91 (diff)
downloaddrakx-49da0edfe4e11c357d99a157aa739c275da71b34.tar
drakx-49da0edfe4e11c357d99a157aa739c275da71b34.tar.gz
drakx-49da0edfe4e11c357d99a157aa739c275da71b34.tar.bz2
drakx-49da0edfe4e11c357d99a157aa739c275da71b34.tar.xz
drakx-49da0edfe4e11c357d99a157aa739c275da71b34.zip
always ensure dm is installed before configuring autologin/desktop
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm6
-rw-r--r--perl-install/install/steps.pm3
2 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 5cf721578..db662f1ae 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -675,6 +675,11 @@ sub set_autologin {
log::l("set_autologin $autologin->{user} $autologin->{desktop}");
my $do_autologin = bool2text($autologin->{user});
+ $autologin->{dm} || = 'xdm';
+ $do_pkgs->ensure_is_installed($autologin->{dm});
+ $do_pkgs->ensure_is_installed('autologin', '/usr/bin/startx.autologin')
+ if $autologin->{user} && $autologin->{dm} eq 'xdm';
+
#- Configure KDM / MDKKDM
eval { common::update_gnomekderc_no_create(common::read_alternative('kdm4-config'), 'X-:0-Core' => (
AutoLoginEnable => $do_autologin,
@@ -691,7 +696,6 @@ sub set_autologin {
if (member($autologin->{desktop}, 'KDE', 'KDE4', 'GNOME')) {
unlink $xdm_autologin_cfg;
} else {
- $do_pkgs->ensure_is_installed('autologin', '/usr/bin/startx.autologin') if $autologin->{user};
setVarsInShMode($xdm_autologin_cfg, 0644,
{ USER => $autologin->{user}, AUTOLOGIN => bool2yesno($autologin->{user}), EXEC => '/usr/bin/startx.autologin' });
}
diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm
index 8ad398c4c..bec45310a 100644
--- a/perl-install/install/steps.pm
+++ b/perl-install/install/steps.pm
@@ -724,9 +724,6 @@ sub addUser {
my $autologin = any::get_autologin();
$autologin->{user} = $o->{autologin};
$autologin->{desktop} = $o->{desktop} if $o->{desktop};
- if ($autologin->{user}) {
- $o->pkg_install("autologin") if !member($autologin->{desktop}, 'KDE', 'KDE4', 'GNOME');
- }
any::set_autologin($o->do_pkgs, $autologin);
install::any::disable_user_view() if @$users == ();