dracut: improve consistency of relative paths in kernel hooks

This commit is contained in:
Andrew J. Hesford 2020-08-05 12:13:08 -04:00
parent 22e18e6794
commit f34677f4a6
5 changed files with 8 additions and 11 deletions

View file

@ -7,9 +7,9 @@
PKGNAME="$1"
VERSION="$2"
if [ ! -x bin/dracut ]; then
if [ ! -x usr/bin/dracut ]; then
exit 0
fi
dracut -q --force boot/initramfs-${VERSION}.img ${VERSION}
usr/bin/dracut -q --force --sysroot . boot/initramfs-${VERSION}.img ${VERSION}
exit $?

View file

@ -7,7 +7,5 @@
PKGNAME="$1"
VERSION="$2"
if [ -f boot/initramfs-${VERSION}.img ]; then
rm -f boot/initramfs-${VERSION}.img
fi
rm -f boot/initramfs-${VERSION}.img
exit $?

View file

@ -12,12 +12,13 @@ if [ -z "${CREATE_UEFI_BUNDLES}" ]; then
exit 0
fi
if [ ! -x bin/dracut ]; then
if [ ! -x usr/bin/dracut ]; then
exit 0
fi
mkdir -p ${UEFI_BUNDLE_DIR:=boot/efi/EFI/void}
dracut -q --force ${KERNEL_CMDLINE:+--kernel-cmdline="${KERNEL_CMDLINE}"} ${DRACUT_OPTIONS} \
usr/bin/dracut -q --force --sysroot . ${DRACUT_OPTIONS} \
${KERNEL_CMDLINE:+--kernel-cmdline="${KERNEL_CMDLINE}"} \
--uefi ${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi ${VERSION}
exit $?

View file

@ -11,7 +11,5 @@ VERSION="$2"
: "${UEFI_BUNDLE_DIR:=boot/efi/EFI/void}"
if [ -f "${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi" ]; then
rm -fv "${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi"
fi
rm -f "${UEFI_BUNDLE_DIR}/linux-${VERSION}.efi"
exit $?

View file

@ -1,7 +1,7 @@
# Template file for 'dracut'
pkgname=dracut
version=050
revision=5
revision=6
build_style=configure
configure_args="--prefix=/usr --sysconfdir=/etc"
conf_files="/etc/dracut.conf"