about summary refs log tree commit diff
path: root/dracut
diff options
context:
space:
mode:
Diffstat (limited to 'dracut')
-rw-r--r--dracut/copy-initramfs.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/dracut/copy-initramfs.sh b/dracut/copy-initramfs.sh
index 055c6a2..ccb2178 100644
--- a/dracut/copy-initramfs.sh
+++ b/dracut/copy-initramfs.sh
@@ -4,4 +4,6 @@
 
 # Copy the initramfs back to the new rootfs for proper shutdown.
 KVER=$(uname -r)
-cp /run/initramfs/live/boot/initrd $NEWROOT/boot/initramfs-${KVER}.img
+if [ -x /usr/bin/systemctl ]; then
+    cp /run/initramfs/live/boot/initrd $NEWROOT/boot/initramfs-${KVER}.img
+fi