From 119d310f36bfaba25ad99266ad41f5abca748b43 Mon Sep 17 00:00:00 2001 From: Jonas Bonn Date: Thu, 2 May 2019 22:09:40 +0100 Subject: systemd: do not create machine-id There is no reason to have an emtpy machine-id as part of the systemd package. Either: i) the filesystem is writable and the file will be created automatically; or ii) the filesystem is read-only, in which case the empty machine-id file should be created as part of the read-only-rootfs tweaks. (From OE-Core rev: 76444b63e614baea33c044851a5859f6d1e69729) Signed-off-by: Jonas Bonn Signed-off-by: Alex Kiernan Signed-off-by: Richard Purdie --- meta/classes/rootfs-postcommands.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meta/classes') diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index bde58ad6cd..89f8efd323 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass @@ -126,6 +126,12 @@ read_only_rootfs_hook () { ${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh fi fi + + if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then + # Create machine-id + # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable + touch ${IMAGE_ROOTFS}${sysconfdir}/machine-id + fi } # -- cgit v1.2.3-54-g00ecf