Lakka-LibreELEC/projects/L4T/packages/systemd/scripts/systemd-machine-id-setup
GavinDarkglider bb321a5eed
Lakka-v5.x Switch Support Fixes (#1753)
* Switch: it builds

* Switch: Use udev to finalize usb gadget to save from systemd looping service restart until cable connected.

* Switch: Update kernel stuff again

* Switch: Downgrade Alsa packages to version in 4.x tree

* Joycond: Update Switch version

* Switch: Minor fixes

* LibreELEC: Fix a few broken files from upstream pull

* Switch: Fix LibreELEC build.

* Switch: Update bootloader stuff

* L4T: FFMPEG: Add support for nvv4l2 decoder/encoder

* FFMPEG: Add back encoder support for game recording in retroarch

* FFMPEG: revert a few changes, and add support for vulkan.
2022-10-13 21:05:34 +03:00

20 lines
804 B
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
# remove old machine-id file
[[ -f "/storage/.cache/machine-id" ]] && rm /storage/.cache/machine-id
# test systemd-machine-id exists and is 32 hex chars or generate a new uuid
MACHINEID="$(cat /storage/.cache/systemd-machine-id 2>/dev/null)"
[ "${#MACHINEID}" != "32" ] && MACHINEID=
[[ "${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