shimboot/patch_initramfs.sh

15 lines
321 B
Bash
Raw Normal View History

2023-10-02 02:08:31 -04:00
#!/bin/bash
#patch the shim initramfs to add the bootloader
set -e
if [ "$DEBUG" ]; then
set -x
fi
initramfs_path=$(realpath $1)
rm "${initramfs_path}/init" -f
cp bootloader/init.sh "${initramfs_path}/sbin/init"
cp bootloader/bootstrap.sh "${initramfs_path}/sbin/bootstrap.sh"
chmod +x "${initramfs_path}/sbin/*.sh"