summaryrefslogtreecommitdiffstats
path: root/src/kernel-install
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:25:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:25:59 +0000
commit1e34d75027c0773e21b35688c27034d5af5e635c (patch)
tree7f3e33142d7a4d06037846454f08b1b0350b2a95 /src/kernel-install
parentAdding upstream version 256.4. (diff)
downloadsystemd-1e34d75027c0773e21b35688c27034d5af5e635c.tar.xz
systemd-1e34d75027c0773e21b35688c27034d5af5e635c.zip
Adding upstream version 256.5.upstream/256.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/kernel-install')
-rwxr-xr-xsrc/kernel-install/50-depmod.install1
-rwxr-xr-xsrc/kernel-install/90-loaderentry.install.in20
2 files changed, 17 insertions, 4 deletions
diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install
index 88f858f..08247c7 100755
--- a/src/kernel-install/50-depmod.install
+++ b/src/kernel-install/50-depmod.install
@@ -44,6 +44,7 @@ case "$COMMAND" in
"/lib/modules/$KERNEL_VERSION/modules.dep.bin" \
"/lib/modules/$KERNEL_VERSION/modules.devname" \
"/lib/modules/$KERNEL_VERSION/modules.softdep" \
+ "/lib/modules/$KERNEL_VERSION/modules.weakdep" \
"/lib/modules/$KERNEL_VERSION/modules.symbols" \
"/lib/modules/$KERNEL_VERSION/modules.symbols.bin"
;;
diff --git a/src/kernel-install/90-loaderentry.install.in b/src/kernel-install/90-loaderentry.install.in
index 4ef6aca..c9ba111 100755
--- a/src/kernel-install/90-loaderentry.install.in
+++ b/src/kernel-install/90-loaderentry.install.in
@@ -79,8 +79,10 @@ elif [ -f /etc/kernel/cmdline ]; then
BOOT_OPTIONS="$(tr -s "$IFS" ' ' </etc/kernel/cmdline)"
elif [ -f /usr/lib/kernel/cmdline ]; then
BOOT_OPTIONS="$(tr -s "$IFS" ' ' </usr/lib/kernel/cmdline)"
-else
+elif ! systemd-detect-virt --container --quiet; then
BOOT_OPTIONS="$(tr -s "$IFS" '\n' </proc/cmdline | grep -ve '^BOOT_IMAGE=' -e '^initrd=' | tr '\n' ' ')"
+else
+ BOOT_OPTIONS=""
fi
BOOT_OPTIONS="${BOOT_OPTIONS% }"
@@ -194,7 +196,7 @@ mkdir -p "${LOADER_ENTRY%/*}" || {
echo "machine-id $MACHINE_ID"
fi
[ -n "$SORT_KEY" ] && echo "sort-key $SORT_KEY"
- echo "options $BOOT_OPTIONS"
+ [ -n "$BOOT_OPTIONS" ] && echo "options $BOOT_OPTIONS"
echo "linux $KERNEL_ENTRY"
[ -n "$DEVICETREE_ENTRY" ] && echo "devicetree $DEVICETREE_ENTRY"
@@ -205,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