[oe-commits] [openembedded-core] 06/13: rootfs-postcommands: call preset-all for read-only-rootfs
git at git.openembedded.org
git at git.openembedded.org
Tue Jan 29 17:45:52 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit f95defbf228f18d364f1cba0fe4a25edb73b0aa9
Author: Jonas Bonn <jonas at norrbonn.se>
AuthorDate: Mon Jan 28 21:58:48 2019 +0100
rootfs-postcommands: call preset-all for read-only-rootfs
When the rootfs is read-only, we cannot rely on systemd's default
invocation of preset-all at runtime in order to enable services. As
such, we need to do it at image creation time.
Signed-off-by: Jonas Bonn <jonas at norrbonn.se>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/rootfs-postcommands.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 89f8efd..5fcd53c 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -16,6 +16,7 @@ ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
# Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
+IMAGE_EXTRADEPENDS += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "systemd-systemctl-native", "", d)}'
# We also need to do the same for the kernel boot parameters,
# otherwise kernel or initramfs end up mounting the rootfs read/write
@@ -131,6 +132,7 @@ read_only_rootfs_hook () {
# 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
+ systemctl --root=${IMAGE_ROOTFS} preset-all
fi
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list