mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-22 22:03:43 +03:00
kernel-install: Try some more initrd variants in 90-loaderentry.install
On CentOS/Fedora, dracut is configured to write the initrd to /boot/initramfs-$KERNEL_VERSION...img so let's check for that as well if no initrds were supplied. (cherry picked from commit b56920e36c5692c0dde701bfb48330653a9c62c9) (cherry picked from commit 1cb21b2cb194501464c52c1f32ae55f593689cc3)
This commit is contained in:
parent
0b4d00b284
commit
22acfc05a7
@ -207,8 +207,18 @@ mkdir -p "${LOADER_ENTRY%/*}" || {
|
||||
have_initrd=yes
|
||||
done
|
||||
|
||||
# Try "initrd", generated by dracut in its kernel-install hook, if no initrds were supplied
|
||||
[ -z "$have_initrd" ] && [ -f "$ENTRY_DIR_ABS/initrd" ] && echo "initrd $ENTRY_DIR/initrd"
|
||||
# Try a few variations that are generated by various initrd generators in their kernel-install hooks if
|
||||
# no initrds were supplied.
|
||||
|
||||
if [ -z "$have_initrd" ] && [ -f "$ENTRY_DIR_ABS/initrd" ]; then
|
||||
echo "initrd $ENTRY_DIR/initrd"
|
||||
have_initrd=yes
|
||||
fi
|
||||
|
||||
if [ -z "$have_initrd" ] && [ -f "$BOOT_ROOT/initramfs-$KERNEL_VERSION.img" ]; then
|
||||
echo "initrd /initramfs-$KERNEL_VERSION.img"
|
||||
have_initrd=yes
|
||||
fi
|
||||
:
|
||||
} >"$LOADER_ENTRY" || {
|
||||
echo "Error: could not create loader entry '$LOADER_ENTRY'." >&2
|
||||
|
Loading…
x
Reference in New Issue
Block a user