void-packages/srcpkgs/dracut/files/kernel-uefi-hook-postinst
Andrew J. Hesford dda8f80545 dracut: in kernel hooks, use binary from target root
Closes: #24236 [via git-merge-pr]
2020-08-14 14:39:04 -04:00

23 lines
506 B
Bash

#!/bin/sh
#
# Kernel post-install hook for dracut EFI bundle.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
. "${ROOTDIR}/etc/default/dracut-uefi-hook"
if [ -z "${CREATE_UEFI_BUNDLES}" ]; then
exit 0
fi
if [ ! -x usr/bin/dracut ]; then
exit 0
fi
mkdir -p ${UEFI_BUNDLE_DIR:=boot/efi/EFI/void}
usr/bin/dracut -q --force ${DRACUT_OPTIONS} \
${KERNEL_CMDLINE:+--kernel-cmdline="${KERNEL_CMDLINE}"} \
--uefi ${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi ${VERSION}