2020-06-01 02:39:55 +02:00
|
|
|
#!/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
|
|
|
|
|
2020-08-12 01:52:00 +02:00
|
|
|
if [ ! -x usr/bin/dracut ]; then
|
2020-06-01 02:39:55 +02:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p ${UEFI_BUNDLE_DIR:=boot/efi/EFI/void}
|
|
|
|
|
2020-08-12 01:52:00 +02:00
|
|
|
usr/bin/dracut -q --force ${DRACUT_OPTIONS} \
|
|
|
|
${KERNEL_CMDLINE:+--kernel-cmdline="${KERNEL_CMDLINE}"} \
|
2020-06-01 02:39:55 +02:00
|
|
|
--uefi ${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi ${VERSION}
|