summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-09-23 17:13:48 +0000
committerOlivier Blin <oblin@mandriva.com>2009-09-23 17:13:48 +0000
commit9113ff8eea83500109190e56a46e4b6d72ef448c (patch)
treed616e9a19fd5b7a618c80242bdaab4148fb8cdca /perl-install/any.pm
parentc0b4e0aba4f8b5d1235e7b473359732d00cdcd1b (diff)
downloaddrakx-9113ff8eea83500109190e56a46e4b6d72ef448c.tar
drakx-9113ff8eea83500109190e56a46e4b6d72ef448c.tar.gz
drakx-9113ff8eea83500109190e56a46e4b6d72ef448c.tar.bz2
drakx-9113ff8eea83500109190e56a46e4b6d72ef448c.tar.xz
drakx-9113ff8eea83500109190e56a46e4b6d72ef448c.zip
pass autologin hash to set_autologin
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm26
1 files changed, 13 insertions, 13 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 {