summaryrefslogtreecommitdiffstats
path: root/perl-install/modules
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/modules')
-rw-r--r--perl-install/modules/modprobe_conf.pm8
-rw-r--r--perl-install/modules/modules_conf.pm5
2 files changed, 11 insertions, 2 deletions
diff --git a/perl-install/modules/modprobe_conf.pm b/perl-install/modules/modprobe_conf.pm
index 2917e27be..b2a57717d 100644
--- a/perl-install/modules/modprobe_conf.pm
+++ b/perl-install/modules/modprobe_conf.pm
@@ -42,14 +42,18 @@ sub set_above {
}
}
+sub create_from_old() {
+ #- use module-init-tools script
+ run_program::rooted($::prefix, "/sbin/generate-modprobe.conf", ">", file());
+}
+
sub read {
my ($type, $o_file) = @_;
my $file = $o_file || do {
my $f = $::prefix . file();
if (!-e $f && -e "$::prefix/etc/modules.conf") {
- #- use module-init-tools script
- run_program::rooted($::prefix, "/sbin/generate-modprobe.conf", ">", file());
+ create_from_old();
}
$f;
};
diff --git a/perl-install/modules/modules_conf.pm b/perl-install/modules/modules_conf.pm
index ed310c2d4..afcf08b35 100644
--- a/perl-install/modules/modules_conf.pm
+++ b/perl-install/modules/modules_conf.pm
@@ -60,6 +60,11 @@ sub write {
};
modules::any_conf::write($conf, $file);
+
+ if ($::isInstall) {
+ require modules::modprobe_conf;
+ modules::modprobe_conf::create_from_old();
+ }
}
1;