copy-initramfs.sh 316 B

123456789
  1. #!/bin/sh
  2. # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
  3. # ex: ts=8 sw=4 sts=4 et filetype=sh
  4. # Copy the initramfs back to the new rootfs for proper shutdown.
  5. KVER=$(uname -r)
  6. if [ -x /usr/bin/systemctl ]; then
  7. cp /run/initramfs/live/boot/initrd $NEWROOT/boot/initramfs-${KVER}.img
  8. fi