summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/modules.pm14
1 files changed, 10 insertions, 4 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 0714ba3e3..4f71d6625 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -432,7 +432,7 @@ sub load {
run_program::run("modprobe", $name, @options);
} else {
$conf{$name}{loaded} and return;
-
+
eval { load($_, 'prereq') } foreach @{$deps{$name}};
load_raw([ $name, @options ]);
}
@@ -548,7 +548,7 @@ sub mergein_conf {
my $modconfref = read_conf ($file, \$scsi);
while (my ($key, $value) = each %$modconfref) {
$conf{$key}{alias} = $value->{alias} unless exists $conf{$key}{alias};
- }
+ }
}
sub write_conf {
@@ -559,10 +559,16 @@ sub write_conf {
#- remove the post-install supermount stuff. We now do it in /etc/modules
#- Substitute new aliases in modules.conf (if config has changed)
+
+ substInFile { $_ = '' if /^post-install supermount/ } $file;
+
substInFile {
- $_ = '' if /^post-install supermount/;
my ($type,$alias,$module) = split /\s+/, $_;
- $_ = "$type $alias $conf{$alias}{alias} \n" if ($type ne "loaded" && $conf{$alias}{alias} && $conf{$alias}{alias} !~ /$module/);
+ if ($type ne "loaded" &&
+ $conf{$alias}{alias} &&
+ $conf{$alias}{alias} !~ /$module/) {
+ $_ = "$type $alias $conf{$alias}{alias} \n";
+ }
} $file;
my $written = read_conf($file);