if /etc/machine-id is empty, use systemd-machine-id-setup
KERNEL_IMAGE="$2"
[[ -f /etc/os-release ]] && . /etc/os-release
+
+if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then
+ systemd-machine-id-setup
+fi
+
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
[[ $MACHINE_ID ]] || exit 1
}
[[ -f /etc/os-release ]] && . /etc/os-release
+
+if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then
+ systemd-machine-id-setup
+fi
+
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
+
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi