summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/any.pm5
-rw-r--r--perl-install/common.pm6
-rw-r--r--perl-install/install/NEWS1
4 files changed, 11 insertions, 3 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 432ab4dd0..b31b0f9c1 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- fix reading and setting kdmrc (by resolving alternative in chroot)
+
Version 10.46 - 10 July 2008
- authentication:
diff --git a/perl-install/any.pm b/perl-install/any.pm
index eda464f54..e8b4a98be 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -606,7 +606,7 @@ You can create additional entries or change the existing ones."), [ {
sub get_autologin() {
my %desktop = getVarsFromSh("$::prefix/etc/sysconfig/desktop");
my $gdm_file = "$::prefix/etc/X11/gdm/custom.conf";
- my $kdm_file = "$::prefix/usr/share/config/kdm/kdmrc";
+ my $kdm_file = common::read_alternative('kdm4-config');
my $desktop = $desktop{DESKTOP} || (! -e $kdm_file && -e $gdm_file ? 'GNOME' : 'KDE4');
my $autologin = do {
if (($desktop{DISPLAYMANAGER} || $desktop) eq 'GNOME') {
@@ -626,8 +626,7 @@ sub set_autologin {
my $autologin = bool2text($o_user);
#- Configure KDM / MDKKDM
- #- /usr/share/config/kdm/kdmrc is an alternative pointing in /var
- eval { common::update_gnomekderc_no_create("$::prefix/usr/share/config/kdm/kdmrc", 'X-:0-Core' => (
+ eval { common::update_gnomekderc_no_create(common::read_alternative('kdm4-config'), 'X-:0-Core' => (
AutoLoginEnable => $autologin,
AutoLoginUser => $o_user,
)) };
diff --git a/perl-install/common.pm b/perl-install/common.pm
index f3aa17273..9ffb01ea1 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -239,6 +239,12 @@ sub join_lines {
}
+sub read_alternative {
+ my ($name) = @_;
+ my $alt = readlink("$::prefix/etc/alternatives/$name");
+ $alt && $::prefix . $alt;
+}
+
sub set_alternative {
my ($command, $executable) = @_;
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 609eeb550..37aae09e0 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,5 +1,6 @@
- load disk/scsi before disk/ide since libata is now the default
(to prevent modules::load_category from loading ide-generic too early)
+- fix reading and setting kdmrc (by resolving alternative in chroot)
Version 10.46 - 10 July 2008