mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-27 20:56:55 +00:00
systemd: fix systemd-machine-id-setup for v247 special case
This commit is contained in:
parent
63cf0d45de
commit
830c72fe53
@ -12,6 +12,9 @@ MACHINEID="$(cat /storage/.cache/systemd-machine-id 2>/dev/null)"
|
|||||||
[[ "${MACHINEID//[a-f0-9]/}" != "" ]] && MACHINEID=
|
[[ "${MACHINEID//[a-f0-9]/}" != "" ]] && MACHINEID=
|
||||||
[ -z "${MACHINEID}" ] && MACHINEID=$(/usr/bin/dbus-uuidgen)
|
[ -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
|
# persist uuid
|
||||||
mkdir -p /storage/.cache
|
mkdir -p /storage/.cache
|
||||||
echo "$MACHINEID" > /storage/.cache/systemd-machine-id
|
echo "$MACHINEID" > /storage/.cache/systemd-machine-id
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Setup machine-id
|
Description=Setup machine-id
|
||||||
DefaultDependencies=no
|
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]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user