summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-21 11:24:44 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-21 11:24:44 +0000
commit58f7e07eacda17f8cb2cb8ef18ed2b8e6a2db86d (patch)
tree5cf301b349911c21bd666411a7bf4ebca9d1c4a6 /perl-install/any.pm
parent5af1b41dc19d56188da17eecfc1017fc98df0463 (diff)
downloaddrakx-backup-do-not-use-58f7e07eacda17f8cb2cb8ef18ed2b8e6a2db86d.tar
drakx-backup-do-not-use-58f7e07eacda17f8cb2cb8ef18ed2b8e6a2db86d.tar.gz
drakx-backup-do-not-use-58f7e07eacda17f8cb2cb8ef18ed2b8e6a2db86d.tar.bz2
drakx-backup-do-not-use-58f7e07eacda17f8cb2cb8ef18ed2b8e6a2db86d.tar.xz
drakx-backup-do-not-use-58f7e07eacda17f8cb2cb8ef18ed2b8e6a2db86d.zip
read gdm autologin settings
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index e2a3d0309..cdd775b8a 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -591,13 +591,15 @@ You can create additional entries or change the existing ones."), [ {
sub get_autologin() {
my %desktop = getVarsFromSh("$::prefix/etc/sysconfig/desktop");
- my $desktop = $desktop{DESKTOP} || 'KDE';
+ my $gdm_file= "$::prefix/etc/X11/gdm/custom.conf";
+ my $kdm_file = "$::prefix/etc/kde/kdm/kdmrc";
+ my $desktop = $desktop{DESKTOP} || (! -e $kdm_file && -e $gdm_file ? 'GNOME' : 'KDE');
my $autologin = do {
if (($desktop{DISPLAYMANAGER} || $desktop) eq 'GNOME') {
- my %conf = read_gnomekderc("$::prefix/etc/X11/gdm/custom.conf", 'daemon');
+ my %conf = read_gnomekderc($gdm_file, 'daemon');
text2bool($conf{AutomaticLoginEnable}) && $conf{AutomaticLogin};
} else { # KDM / MdkKDM
- my %conf = read_gnomekderc("$::prefix/etc/kde/kdm/kdmrc", 'X-:0-Core');
+ my %conf = read_gnomekderc($kdm_file, 'X-:0-Core');
text2bool($conf{AutoLoginEnable}) && $conf{AutoLoginUser};
}
};