summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2012-01-15 20:52:06 +0000
committerOlivier Blin <blino@mageia.org>2012-01-15 20:52:06 +0000
commit4c2866896df8e6c9d9371fb3c244e8ea425653af (patch)
tree5410294f8c276f44c79b9603e0e671f1e62a12b0
parent411c9f912dd9ef44cb8df35d436d0ea6954da283 (diff)
downloaddraklive-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-xdraklive8
1 files changed, 8 insertions, 0 deletions
diff --git a/draklive b/draklive
index 180bba6..8bcf33c 100755
--- a/draklive
+++ b/draklive
@@ -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 {