summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MDV/Draklive/Initrd.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm
index e869cbf..bedb362 100644
--- a/lib/MDV/Draklive/Initrd.pm
+++ b/lib/MDV/Draklive/Initrd.pm
@@ -14,14 +14,14 @@ my %module_to_config = (
sd_mod => 'BLK_DEV_SD',
);
-sub require_list_modules_chroot {
- my ($live) = @_;
- my $chroot_list_modules = cat_($live->get_system_root . "/usr/lib/libDrakX/list_modules.pm");
- $chroot_list_modules =~ s/^package list_modules;\B/package list_modules_chroot;/;
- my $tmp_list_modules = $live->get_system_root . "/tmp/list_modules_chroot.pm";
- output_p($tmp_list_modules, $chroot_list_modules);
- require $tmp_list_modules;
- unlink $tmp_list_modules;
+sub require_module_in_chroot {
+ my ($live, $module) = @_;
+ my $chroot_module = cat_($live->get_system_root . "/usr/lib/libDrakX/$module.pm");
+ $chroot_module =~ s/^package $module;\B/package ${module}_chroot;/;
+ my $tmp_module = $live->get_system_root . "/tmp/${module}_chroot.pm";
+ output_p($tmp_module, $chroot_module);
+ require $tmp_module;
+ unlink $tmp_module;
}
sub nls_modules {
@@ -75,7 +75,7 @@ sub create_initrd_for_media {
sub create_media_specific_initrd {
my ($live, $media, $root, $initrd, $kernel) = @_;
- require_list_modules_chroot($live);
+ require_module_in_chroot($live, "list_modules");
my $lib_prefix = $live->get_lib_prefix;
my $initrd_tree = $live->get_builddir . $live->{prefix}{build}{initrd} . '/' . $media->{storage};