systemd: fix systemd-machine-id-setup for v247 special case

This commit is contained in:
mglae 2021-05-27 17:48:07 +02:00
parent 63cf0d45de
commit 830c72fe53
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,9 @@ MACHINEID="$(cat /storage/.cache/systemd-machine-id 2>/dev/null)"
[[ "${MACHINEID//[a-f0-9]/}" != "" ]] && MACHINEID=
[ -z "${MACHINEID}" ] && MACHINEID=$(/usr/bin/dbus-uuidgen)
# For first boot detection systemd may have overmounted the file
umount /storage/.cache/systemd-machine-id >/dev/null 2>&1
# persist uuid
mkdir -p /storage/.cache
echo "$MACHINEID" > /storage/.cache/systemd-machine-id

View File

@ -1,7 +1,9 @@
[Unit]
Description=Setup machine-id
DefaultDependencies=no
Before=systemd-journald.service systemd-tmpfiles-setup-dev.service
Conflicts=shutdown.target
Before=systemd-journald.service systemd-tmpfiles-setup-dev.service shutdown.target
After=local-fs.target
[Service]
Type=oneshot