summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-09-23 12:17:47 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-09-23 12:17:47 +0000
commit5b86f0e29fe34ef58825785b3ea295ab0f2dda4f (patch)
treea864af8d0496186fdc8cefe875cab3f087e1102d /lib
parentdc672286dd776deb68794d0acdd026095ff0c4ff (diff)
downloaddraklive-5b86f0e29fe34ef58825785b3ea295ab0f2dda4f.tar
draklive-5b86f0e29fe34ef58825785b3ea295ab0f2dda4f.tar.gz
draklive-5b86f0e29fe34ef58825785b3ea295ab0f2dda4f.tar.bz2
draklive-5b86f0e29fe34ef58825785b3ea295ab0f2dda4f.tar.xz
draklive-5b86f0e29fe34ef58825785b3ea295ab0f2dda4f.zip
refine plymouth support
Diffstat (limited to 'lib')
-rw-r--r--lib/MDV/Draklive/Initrd.pm37
1 files changed, 14 insertions, 23 deletions
diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm
index bffc684..dcd5361 100644
--- a/lib/MDV/Draklive/Initrd.pm
+++ b/lib/MDV/Draklive/Initrd.pm
@@ -190,23 +190,10 @@ sub create_media_specific_initrd {
uniq(map { list_modules::dependencies_closure($_) } @$extra_modules);
create_initrd_scriptlet($live, $media, @extra_modules_closure, @additional_modules);
-
- my $plymouth_theme_name = basename(dirname(expand_symlinks($root . "/usr/share/plymouth/themes/default.plymouth")));
- my $plymouth_theme_path = "/usr/share/plymouth/themes/" . $plymouth_theme_name;
- print "Copying plymouth theme $plymouth_theme_name\n";
- mkdir_p($initrd_tree . "/usr/share/plymouth/themes");
- cp_af($root . $plymouth_theme_path, $initrd_tree . $plymouth_theme_path);
-
- my $plymouth_module_name = `grep "ModuleName *= *" $root/usr/share/plymouth/themes/$plymouth_theme_name/$plymouth_theme_name.plymouth | sed 's/ModuleName *= *//'`;
- chomp $plymouth_module_name;
- foreach (qw(/sbin/plymouthd /bin/plymouth /usr/share/plymouth/themes/text/text.plymouth /usr/share/plymouth/themes/details/details.plymouth /usr/share/icons/large/mandriva.png /etc/mandriva-release /usr/share/plymouth/themes/default.plymouth ), "/usr/$lib_prefix/plymouth/text.so", "/usr/$lib_prefix/plymouth/details.so", "/usr/$lib_prefix/plymouth/$plymouth_module_name.so") {
- inst_initrd_file ($root, $initrd_tree, $_);
- }
+ add_splash($live, $initrd_tree);
print "Compressing initrd\n";
-
compress_initrd_tree($live, $initrd_tree, $initrd);
- add_splash($live, $initrd);
}
sub create_initrd_scriptlet {
@@ -286,17 +273,21 @@ sub compress_initrd_tree {
}
sub add_splash {
- my ($live, $initrd) = @_;
+ my ($live, $initrd_tree) = @_;
if ($live->{system}{vga_mode} && $live->{system}{splash} ne 'no') {
- require bootloader;
- my $tmp_initrd = '/tmp/initrd.gz';
- cp_f($initrd, $live->get_system_root . $tmp_initrd);
- {
- local $::prefix = $live->get_system_root;
- bootloader::add_boot_splash($tmp_initrd, $live->{system}{vga_mode});
+ my $root = $live->get_system_root();
+
+ my $plymouth_theme_name = basename(dirname(expand_symlinks($root . "/usr/share/plymouth/themes/default.plymouth")));
+ my $plymouth_theme_path = "/usr/share/plymouth/themes/" . $plymouth_theme_name;
+ print "Copying plymouth theme $plymouth_theme_name\n";
+ mkdir_p($initrd_tree . "/usr/share/plymouth/themes");
+ cp_af($root . $plymouth_theme_path, $initrd_tree . $plymouth_theme_path);
+
+ my $plymouth_module_name = `grep "ModuleName *= *" $root/usr/share/plymouth/themes/$plymouth_theme_name/$plymouth_theme_name.plymouth | sed 's/ModuleName *= *//'`;
+ chomp $plymouth_module_name;
+ foreach (qw(/sbin/plymouthd /bin/plymouth /usr/share/plymouth/themes/text/text.plymouth /usr/share/plymouth/themes/details/details.plymouth /usr/share/icons/large/mandriva.png /etc/mandriva-release /usr/share/plymouth/themes/default.plymouth ), "/usr/$lib_prefix/plymouth/text.so", "/usr/$lib_prefix/plymouth/details.so", "/usr/$lib_prefix/plymouth/$plymouth_module_name.so") {
+ inst_initrd_file ($root, $initrd_tree, $_);
}
- cp_f($live->get_system_root . $tmp_initrd, $initrd);
- unlink($live->get_system_root . $tmp_initrd);
}
}