diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-08-28 17:56:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-08-28 17:56:30 +0000 |
commit | 2ca5c111460c911e1f2360dffe8f56df97a6a7fb (patch) | |
tree | b7cf4e6e6a6328cad1c4e92670750d33bba94733 | |
parent | a1ae8148195289a08a9464eb74b9454ca997d1d3 (diff) | |
download | drakx-2ca5c111460c911e1f2360dffe8f56df97a6a7fb.tar drakx-2ca5c111460c911e1f2360dffe8f56df97a6a7fb.tar.gz drakx-2ca5c111460c911e1f2360dffe8f56df97a6a7fb.tar.bz2 drakx-2ca5c111460c911e1f2360dffe8f56df97a6a7fb.tar.xz drakx-2ca5c111460c911e1f2360dffe8f56df97a6a7fb.zip |
- configure /etc/sysconfig/autologin in case of xdm, but remove it if kde/gnome
- create any::sessions()
-rw-r--r-- | perl-install/any.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 5f79fbb50..5acef5e5a 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -491,6 +491,13 @@ sub set_autologin { setVarsInSh("$::prefix/etc/sysconfig/desktop", \%l); log::l("cat $::prefix/etc/sysconfig/desktop ($desktop):\n", cat_("$::prefix/etc/sysconfig/desktop")); } + my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin"; + if (member($desktop, 'KDE', 'Gnome')) { + unlink $xdm_autologin_cfg; + } else { + setVarsInShMode($xdm_autologin_cfg, 0644, + { USER => $user, AUTOLOGIN => bool2yesno($user), EXEC => '/usr/X11R6/bin/startx.autologin' }); + } } sub rotate_log { @@ -614,10 +621,14 @@ sub ask_users { } } +sub sessions { + split(' ', run_program::rooted_get_stdout($::prefix, '/usr/sbin/chksession', '-l')); +} + sub autologin { my ($o, $in) = @_; - my @wm = split(' ', run_program::rooted_get_stdout($::prefix, '/usr/sbin/chksession', '-l')); + my @wm = sessions(); my @users = map { $_->{name} } @{$o->{users} || []}; if (member('KDE', @wm) && @users == 1 && $o->{meta_class} eq 'discovery') { |