소스 검색

dracut/copy-initramfs.sh: only run this with systemd.

Juan RP 11 년 전
부모
커밋
ef81fb90f8
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      dracut/copy-initramfs.sh

+ 3 - 1
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