about summary refs log tree commit diff
path: root/dracut/copy-initramfs.sh
blob: ccb2178b2e9cd4b721c2c5377109a633dca36c10 (plain) (blame)
1
2
3
4
5
6
7
8
9
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# Copy the initramfs back to the new rootfs for proper shutdown.
KVER=$(uname -r)
if [ -x /usr/bin/systemctl ]; then
    cp /run/initramfs/live/boot/initrd $NEWROOT/boot/initramfs-${KVER}.img
fi