From 10894d9d90bae99b09552c2d2eb84217fdba76d9 Mon Sep 17 00:00:00 2001 From: Celestia Ludenberg Date: Tue, 30 Jun 2026 21:11:47 +0200 Subject: [PATCH] fix: add systemd-machine-id-setup stub for Calamares machineid module --- .../usr/bin/systemd-machine-id-setup | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 iso-profiles/antergos/live-overlay/usr/bin/systemd-machine-id-setup diff --git a/iso-profiles/antergos/live-overlay/usr/bin/systemd-machine-id-setup b/iso-profiles/antergos/live-overlay/usr/bin/systemd-machine-id-setup new file mode 100755 index 0000000..f31d304 --- /dev/null +++ b/iso-profiles/antergos/live-overlay/usr/bin/systemd-machine-id-setup @@ -0,0 +1,29 @@ +#!/bin/bash + +ROOT="" + +for arg in "$@"; do + case "$arg" in + --root=*) + ROOT="${arg#*=}" + ;; + esac +done + +MACHINE_ID_FILE="${ROOT}/etc/machine-id" + +if [ -f "$MACHINE_ID_FILE" ] && [ -s "$MACHINE_ID_FILE" ]; then + exit 0 +fi + +mkdir -p "$(dirname "$MACHINE_ID_FILE")" + +if command -v dbus-uuidgen &>/dev/null; then + dbus-uuidgen --ensure 2>/dev/null +fi + +if [ ! -f "$MACHINE_ID_FILE" ] || [ ! -s "$MACHINE_ID_FILE" ]; then + od -An -N16 -tx1 /dev/urandom | tr -d ' \n' > "$MACHINE_ID_FILE" +fi + +chmod 0644 "$MACHINE_ID_FILE"