summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-07-10 12:53:50 +0000
committerOlivier Blin <oblin@mandriva.com>2008-07-10 12:53:50 +0000
commit683cd952f24d1ff0177e48780d79bce3386263e7 (patch)
tree2c80fe33302af5b3d9a1cbb98d6fafbf24b95328 /perl-install
parent9bccc7c1f3b773f187376ffbdd04bccb6afe7753 (diff)
downloaddrakx-683cd952f24d1ff0177e48780d79bce3386263e7.tar
drakx-683cd952f24d1ff0177e48780d79bce3386263e7.tar.gz
drakx-683cd952f24d1ff0177e48780d79bce3386263e7.tar.bz2
drakx-683cd952f24d1ff0177e48780d79bce3386263e7.tar.xz
drakx-683cd952f24d1ff0177e48780d79bce3386263e7.zip
fix reading and setting kdmrc (by resolving alternative in chroot)
Diffstat (limited to 'perl-install')
-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