kernel-install: Reuse $BOOT/Default if it already exists
Avoids duplicate installation problems when the machine ID is initialized after a kernel is already installed under $BOOT/Default.
This commit is contained in:
parent
6426c98ac5
commit
2c46d523ac
|
@ -85,7 +85,10 @@ 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="Default"
|
||||
|
|
Loading…
Reference in New Issue