diff options
Diffstat (limited to 'sys-kernel/installkernel-systemd/files/installkernel-systemd-3-10-copy-prebuilt.install')
-rw-r--r-- | sys-kernel/installkernel-systemd/files/installkernel-systemd-3-10-copy-prebuilt.install | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys-kernel/installkernel-systemd/files/installkernel-systemd-3-10-copy-prebuilt.install b/sys-kernel/installkernel-systemd/files/installkernel-systemd-3-10-copy-prebuilt.install new file mode 100644 index 000000000000..56f4641d9664 --- /dev/null +++ b/sys-kernel/installkernel-systemd/files/installkernel-systemd-3-10-copy-prebuilt.install @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +# this file is installed by sys-kernel/installkernel-systemd + +COMMAND="${1}" +KERNEL_IMAGE="${4}" + +if [ "${COMMAND}" != "add" ]; then + exit 0 +fi + +IMAGE_DIR="$(dirname ${KERNEL_IMAGE})" +INITRD=${IMAGE_DIR}/initrd +UKI=${IMAGE_DIR}/uki.efi + +if [ -f "${INITRD}" ]; then + echo "Copying prebuilt initramfs to staging area" + cp "${INITRD}" "${KERNEL_INSTALL_STAGING_AREA}/initrd" || exit 1 +fi + +if [ -f "${UKI}" ]; then + echo "Copying prebuilt UKI to staging area" + cp "${UKI}" "${KERNEL_INSTALL_STAGING_AREA}/uki.efi" || exit 1 +fi |