<filename>/etc/machine-id</filename>
</term>
<listitem>
- <para>The content of the file specifies the machine identification <replaceable>MACHINE-ID</replaceable>.</para>
+ <para>The content of this file specifies the machine identification
+ <replaceable>MACHINE-ID</replaceable>. If it cannot read <filename>/etc/machine-id</filename>,
+ kernel-install will use "Linux" as the machine ID instead.</para>
</listitem>
</varlistentry>
<varlistentry>
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
+else
+ MACHINE_ID="Linux"
fi
if [[ ! $COMMAND ]] || [[ ! $KERNEL_VERSION ]]; then
exit 1
fi
-if ! [[ $MACHINE_ID ]]; then
- ENTRY_DIR_ABS=$(mktemp -d /tmp/kernel-install.XXXXX) || exit 1
- trap "rm -rf '$ENTRY_DIR_ABS'" EXIT INT QUIT PIPE
-elif [[ -d /efi/loader/entries ]] || [[ -d /efi/$MACHINE_ID ]]; then
+if [[ -d /efi/loader/entries ]] || [[ -d /efi/$MACHINE_ID ]]; then
ENTRY_DIR_ABS="/efi/$MACHINE_ID/$KERNEL_VERSION"
elif [[ -d /boot/loader/entries ]] || [[ -d /boot/$MACHINE_ID ]]; then
ENTRY_DIR_ABS="/boot/$MACHINE_ID/$KERNEL_VERSION"
((ret+=$x))
fi
done
-
- if ! [[ $MACHINE_ID ]] && ! rmdir "$ENTRY_DIR_ABS"; then
- echo "Warning: In kernel-install plugins, requiring ENTRY_DIR_ABS to be preset is deprecated." >&2
- echo " All plugins should not put anything in ENTRY_DIR_ABS if the environment" >&2
- echo " variable KERNEL_INSTALL_MACHINE_ID is empty." >&2
- rm -rf "$ENTRY_DIR_ABS"
- ((ret+=$?))
- fi
;;
remove)