summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/modules/any_conf.pm28
-rw-r--r--perl-install/modules/modprobe_conf.pm2
-rw-r--r--perl-install/modules/modules_conf.pm2
3 files changed, 19 insertions, 13 deletions
diff --git a/perl-install/modules/any_conf.pm b/perl-install/modules/any_conf.pm
index 0af11a461..28e22bf9b 100644
--- a/perl-install/modules/any_conf.pm
+++ b/perl-install/modules/any_conf.pm
@@ -125,17 +125,7 @@ sub read {
my (undef, $o_file) = @_;
my $conf = modules::any_conf::vnew();
- my $raw_conf = modules::any_conf::read_raw($o_file || $::prefix . $conf->file);
-
- foreach my $module (keys %$raw_conf) {
- my $raw = $raw_conf->{$module};
- my $keep = $conf->{$module} = {};
- foreach ($conf->handled_fields) {
- $keep->{$_} = $raw->{$_} if $raw->{$_};
- }
- }
-
- $conf;
+ $conf->read($o_file);
}
sub write {
@@ -178,6 +168,22 @@ sub write {
################################################################################
+sub read_handled {
+ my ($conf, $o_file) = @_;
+ my $file = $o_file || $::prefix . $conf->file;
+ my $raw_conf = modules::any_conf::read_raw($file);
+
+ foreach my $module (keys %$raw_conf) {
+ my $raw = $raw_conf->{$module};
+ my $keep = $conf->{$module} = {};
+ foreach ($conf->handled_fields) {
+ $keep->{$_} = $raw->{$_} if $raw->{$_};
+ }
+ }
+
+ $conf;
+}
+
sub read_raw {
my ($file) = @_;
my %c;
diff --git a/perl-install/modules/modprobe_conf.pm b/perl-install/modules/modprobe_conf.pm
index 2db68122d..2917e27be 100644
--- a/perl-install/modules/modprobe_conf.pm
+++ b/perl-install/modules/modprobe_conf.pm
@@ -54,7 +54,7 @@ sub read {
$f;
};
- my $conf = modules::any_conf::read($type, $file);
+ my $conf = modules::any_conf::read_handled($type, $file);
extract_probeall_field($conf);
diff --git a/perl-install/modules/modules_conf.pm b/perl-install/modules/modules_conf.pm
index 476fd300f..ed310c2d4 100644
--- a/perl-install/modules/modules_conf.pm
+++ b/perl-install/modules/modules_conf.pm
@@ -36,7 +36,7 @@ sub set_above {
sub read {
my ($type, $o_file) = @_;
- my $conf = modules::any_conf::read($type, $o_file);
+ my $conf = modules::any_conf::read_handled($type, $o_file);
#- convert old aliases to new probeall
foreach my $name ('scsi_hostadapter', 'usb-interface') {