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:
commit
c3bbc90b4a
|
@ -85,10 +85,13 @@ fi
|
||||||
KERNEL_VERSION="$1"
|
KERNEL_VERSION="$1"
|
||||||
KERNEL_IMAGE="$2"
|
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
|
read MACHINE_ID < /etc/machine-id
|
||||||
else
|
else
|
||||||
MACHINE_ID="Linux"
|
MACHINE_ID="Default"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! $COMMAND ]] || [[ ! $KERNEL_VERSION ]]; then
|
if [[ ! $COMMAND ]] || [[ ! $KERNEL_VERSION ]]; then
|
||||||
|
|
Loading…
Reference in New Issue