kernel-install: add a new $ENTRY_TOKEN variable for naming boot entries
authorLennart Poettering <lennart@poettering.net>
Wed, 9 Feb 2022 13:29:19 +0000 (14:29 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 11 Mar 2022 10:34:34 +0000 (11:34 +0100)
commit3907044ffa568aedf076d0f9807489ec78f87502
treefcd73fd37dc0bd18735cf574a502202c8e0733d1
parent11ce3ea2f2219ab9c0700bcf7f8ed4312d80e937
kernel-install: add a new $ENTRY_TOKEN variable for naming boot entries

This cleans up naming of boot loader spec boot entries a bit (i.e. the
naming of the .conf snippet files, and the directory in $BOOT where the
kernel images and initrds are placed), and isolates it from the actual machine
ID concept.

Previously there was a sinlge concept for both things, because typically
the entries are just named after the machine ID. However one could also
use a different identifier, i.e. not a 128bit ID in which cases issues
pop up everywhere. For example, the "machine-id" field in the generated
snippets would not be a machine ID anymore, and the newly added
systemd.machine_id= kernel parameter would possibly get passed invalid
data.

Hence clean this up:

$MACHINE_ID → always a valid 128bit ID.

$ENTRY_TOKEN → usually the $MACHINE_ID but can be any other string too.
This is used to name the directory to put kernels/initrds in. It's also
used for naming the *.conf snippets that implement the Boot Loader Type
1 spec.
src/kernel-install/90-loaderentry.install
src/kernel-install/kernel-install