mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
kernel-install: automatically generate "sort-key" field
Let's order by IMAGE_ID=/ID= by default.
This commit is contained in:
@@ -62,6 +62,9 @@ fi
|
||||
|
||||
[ -n "$PRETTY_NAME" ] || PRETTY_NAME="Linux $KERNEL_VERSION"
|
||||
|
||||
SORT_KEY="$IMAGE_ID"
|
||||
[ -z "$SORT_KEY" ] && SORT_KEY="$ID"
|
||||
|
||||
if [ -r /etc/kernel/cmdline ]; then
|
||||
BOOT_OPTIONS="$(tr -s "$IFS" ' ' </etc/kernel/cmdline)"
|
||||
elif [ -r /usr/lib/kernel/cmdline ]; then
|
||||
@@ -130,6 +133,7 @@ mkdir -p "${LOADER_ENTRY%/*}" || {
|
||||
# See similar logic above for the systemd.machine_id= kernel command line option
|
||||
echo "machine-id $MACHINE_ID"
|
||||
fi
|
||||
[ -n "$SORT_KEY" ] && echo "sort-key $SORT_KEY"
|
||||
echo "options $BOOT_OPTIONS"
|
||||
echo "linux $ENTRY_DIR/linux"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user