about summary refs log tree commit diff
path: root/dracut
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-06-29 12:36:51 +0200
committerJuan RP <xtraeme@gmail.com>2014-06-29 12:36:51 +0200
commitef81fb90f810a771686a8cc0f52cb2b70985357e (patch)
tree8f0d8bf04399b2981f059be4098bd37384b60f1b /dracut
parent204277a8a8e5cf724af9d21591c04a483d3e57dd (diff)
downloadhrmpf-ef81fb90f810a771686a8cc0f52cb2b70985357e.tar.gz
hrmpf-ef81fb90f810a771686a8cc0f52cb2b70985357e.tar.xz
hrmpf-ef81fb90f810a771686a8cc0f52cb2b70985357e.zip
dracut/copy-initramfs.sh: only run this with systemd.
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