summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-10-23 20:17:45 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-10-28 21:46:42 +0000
commitc3a1bd73c4160cb16ede66efbb3b3a87e64634da (patch)
treee129030e432c0a4e6596a50d41616b87165721e5 /lib/MGA/DrakISO
parent17fd0a64991e31a7d512bfb0bc3778f9440d332c (diff)
downloaddrakiso-c3a1bd73c4160cb16ede66efbb3b3a87e64634da.tar
drakiso-c3a1bd73c4160cb16ede66efbb3b3a87e64634da.tar.gz
drakiso-c3a1bd73c4160cb16ede66efbb3b3a87e64634da.tar.bz2
drakiso-c3a1bd73c4160cb16ede66efbb3b3a87e64634da.tar.xz
drakiso-c3a1bd73c4160cb16ede66efbb3b3a87e64634da.zip
BuildBoot: copy rather than move the initrd into the build directory.
We need the initrd in /boot of the live filesystem to allow us to pivot back to the initramfs on shutdown. Without this, we can't cleanly unmount a persistent filesystem.
Diffstat (limited to 'lib/MGA/DrakISO')
-rw-r--r--lib/MGA/DrakISO/BuildBoot.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/MGA/DrakISO/BuildBoot.pm b/lib/MGA/DrakISO/BuildBoot.pm
index a7481fd..95c1a10 100644
--- a/lib/MGA/DrakISO/BuildBoot.pm
+++ b/lib/MGA/DrakISO/BuildBoot.pm
@@ -79,9 +79,8 @@ sub prepare_live_system_boot {
run_as_root('chmod', '644', $root . $initrd)
or die "ERROR: cannot chmod initrd\n";
- # Move the initrd into the build directory.
- run_as_root('mv', $root . $initrd, $boot_dir . '/initrd.img')
- or die "ERROR: cannot move initrd\n";
+ # Copy the initrd into the build directory.
+ cp_f($root . $initrd, $boot_dir . '/initrd.img');
} catch {
$error_message = $_;
} finally {