Merge pull request #16777 from DaanDeMeyer/kernel-install-followup

kernel-install: "Linux" => "Default" and reuse $BOOT/Default if it already exists
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-08-25 09:30:44 +02:00 committed by GitHub
commit c3bbc90b4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -85,10 +85,13 @@ fi
KERNEL_VERSION="$1"
KERNEL_IMAGE="$2"
if [[ -f /etc/machine-id ]]; then
# Reuse directory created without a machine ID present if it exists.
if [[ -d /efi/Default ]] || [[ -d /boot/Default ]] || [[ -d /boot/efi/Default ]]; then
MACHINE_ID="Default"
elif [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
else
MACHINE_ID="Linux"
MACHINE_ID="Default"
fi
if [[ ! $COMMAND ]] || [[ ! $KERNEL_VERSION ]]; then