Skip to content

Commit 0b3cc2c

Browse files
95-efistub-kernel-bootcfg.install: sync label with upstream
PRETTY_NAME usually already contains VERSION_ID, so this would be double. Not that it really effects Gentoo since we are rolling. Signed-off-by: Andrew Ammerlaan <[email protected]>
1 parent 53ef131 commit 0b3cc2c

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

hooks/systemd/95-efistub-kernel-bootcfg.install

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ if [[ ${KERNEL_INSTALL_LAYOUT} == "uki" ]]; then
3636
. /usr/lib/os-release
3737
fi
3838

39-
TITLE="${PRETTY_NAME:+$PRETTY_NAME }${VERSION_ID:+$VERSION_ID }${KERNEL_VERSION} (UKI)"
39+
if [[ -n "${PRETTY_NAME}" ]]; then
40+
TITLE="${PRETTY_NAME} ${KERNEL_VERSION} (UKI)"
41+
elif [[ -n "${NAME}" ]] && [[ -n "${VERSION_ID}" ]]; then
42+
TITLE="${NAME} ${VERSION_ID} ${KERNEL_VERSION} (UKI)"
43+
else
44+
TITLE="${ENTRY_TOKEN} ${KERNEL_VERSION} (UKI)"
45+
fi
46+
4047
PARTLABEL="$(df "${UKI}" --output=source | tail -1 | xargs -r lsblk --output=PARTLABEL --noheadings)"
4148
if [[ -n ${PARTLABEL} ]]; then
4249
TITLE="${TITLE} on ${PARTLABEL}"
@@ -100,7 +107,14 @@ elif [[ ${KERNEL_INSTALL_LAYOUT} == "efistub" ]]; then
100107
KERNEL_BOOTCFG_ARGS+=( --cmdline "${BOOT_OPTIONS}" )
101108
fi
102109

103-
TITLE="${PRETTY_NAME:+$PRETTY_NAME }${VERSION_ID:+$VERSION_ID }${KERNEL_VERSION} (plain)"
110+
if [[ -n "${PRETTY_NAME}" ]]; then
111+
TITLE="${PRETTY_NAME} ${KERNEL_VERSION} (plain)"
112+
elif [[ -n "${NAME}" ]] && [[ -n "${VERSION_ID}" ]]; then
113+
TITLE="${NAME} ${VERSION_ID} ${KERNEL_VERSION} (plain)"
114+
else
115+
TITLE="${ENTRY_TOKEN} ${KERNEL_VERSION} (plain)"
116+
fi
117+
104118
PARTLABEL="$(df "${KERNEL_IMAGE}" --output=source | tail -1 | xargs -r lsblk --output=PARTLABEL --noheadings)"
105119
if [[ -n ${PARTLABEL} ]]; then
106120
TITLE="${TITLE} on ${PARTLABEL}"

0 commit comments

Comments
 (0)