summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-06-02 05:38:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-06-02 05:38:11 +0000
commit0493ab2a5e7d5f8f4038730efc37919d90f647be (patch)
tree2cfe8a332ea6731308db2ad2ac0e93636c9d4ce0
parent6e9c6ce48159d3df1cb69788bebc503ff8697e26 (diff)
downloaddrakx-0493ab2a5e7d5f8f4038730efc37919d90f647be.tar
drakx-0493ab2a5e7d5f8f4038730efc37919d90f647be.tar.gz
drakx-0493ab2a5e7d5f8f4038730efc37919d90f647be.tar.bz2
drakx-0493ab2a5e7d5f8f4038730efc37919d90f647be.tar.xz
drakx-0493ab2a5e7d5f8f4038730efc37919d90f647be.zip
read in existing modprobe.conf on upgrade (bugzilla #13309)
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/modules/any_conf.pm10
2 files changed, 11 insertions, 1 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 6d40d923f..10a9abf8d 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -145,6 +145,8 @@ sub selectInstallClass {
@{$o->{orderedSteps}} = uniq(map {
$_ eq 'selectInstallClass' ? ($_, 'doPartitionDisks', 'formatPartitions') : $_;
} @{$o->{orderedSteps}});
+
+ $o->{modules_conf}->merge_into(modules::any_conf->read);
}
}
diff --git a/perl-install/modules/any_conf.pm b/perl-install/modules/any_conf.pm
index c6174fd81..fbf488937 100644
--- a/perl-install/modules/any_conf.pm
+++ b/perl-install/modules/any_conf.pm
@@ -168,8 +168,16 @@ sub write {
modules::write_preload_conf($conf);
}
+sub merge_into {
+ my ($conf, $conf2) = @_;
-
+ if (ref($conf) eq ref($conf2)) {
+ log::l("merging " . ref($conf));
+ add2hash($conf, $conf2);
+ } else {
+ log::l("not merging modules_conf " . ref($conf2) . " into " . ref($conf));
+ }
+}
################################################################################
sub read_handled {