Skip to content

Commit

Permalink
Add machine-id support via cmdline.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
agners committed Nov 7, 2023
1 parent 9c42ad7 commit 43a27f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions buildroot-external/rootfs-overlay/usr/libexec/hassos-persists
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,12 @@ elif [ -e /usr/bin/grub-editenv ]; then
echo "[INFO] machine-id is okay"
fi

else
if ! grep -q "systemd.machine_id=${MACHINE_ID}" /mnt/boot/cmdline.txt; then
echo "[INFO] set machine-id to ${MACHINE_ID}"
sed -i "s/systemd.machine_id=[0-f]*/systemd.machine_id=${MACHINE_ID}/" /mnt/boot/cmdline.txt
else
echo "[INFO] machine-id is okay"
fi

fi

0 comments on commit 43a27f8

Please sign in to comment.