diff options
author | Olivier Blin <blino@mageia.org> | 2012-01-15 20:52:06 +0000 |
---|---|---|
committer | Olivier Blin <blino@mageia.org> | 2012-01-15 20:52:06 +0000 |
commit | 4c2866896df8e6c9d9371fb3c244e8ea425653af (patch) | |
tree | 5410294f8c276f44c79b9603e0e671f1e62a12b0 | |
parent | 411c9f912dd9ef44cb8df35d436d0ea6954da283 (diff) | |
download | draklive-4c2866896df8e6c9d9371fb3c244e8ea425653af.tar draklive-4c2866896df8e6c9d9371fb3c244e8ea425653af.tar.gz draklive-4c2866896df8e6c9d9371fb3c244e8ea425653af.tar.bz2 draklive-4c2866896df8e6c9d9371fb3c244e8ea425653af.tar.xz draklive-4c2866896df8e6c9d9371fb3c244e8ea425653af.zip |
move initrd to the expected location for live systems
-rwxr-xr-x | draklive | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -29,6 +29,7 @@ use run_program; use Getopt::Long; use Pod::Usage; use File::Temp; +use File::Copy qw(mv); use IO::Handle; #- autoflush use POSIX; use MDV::Draklive::Utils; @@ -513,6 +514,13 @@ sub create_initrd { run_('umount', $root . '/sys'); run_('umount', $root . '/proc'); + + if (need_media_specific_boot($live)) { + my $rootfs_initrd = $root . '/boot/' . $live->get_initrd_name; + my $media_initrd = $live->get_builddir . $live->{prefix}{build}{boot} . $live->{media}->get_initrd_path; + mkdir_p(dirname($media_initrd)); + mv($rootfs_initrd, $media_initrd) or die "can not move initrd: $!"; + } } sub create_bootloader { |