[Buildroot] [git commit] package/skeleton-systemd: move var factory comment closer to code
Yann E. MORIN
yann.morin.1998 at free.fr
Thu Dec 22 20:49:13 UTC 2022
commit: https://git.buildroot.net/buildroot/commit/?id=e02fdfe26b2ad36166379c444e017f832946f30d
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Commit 8cbfbe487ac6 (package/skeleton-systemd: systemd-ify mounting /var
tmpfs with ro rootfs) removed the fstab handling of /var, and left the
macro deal solely about keeping / read-only.
However, the code about how the var factory is handled was left above
the macro, which is now misleading and confusing.
Move the comment closer to the actual rootfs-pre-cmd hook which actually
deals with handling the var factory.
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
---
package/skeleton-init-systemd/skeleton-init-systemd.mk | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/skeleton-init-systemd/skeleton-init-systemd.mk b/package/skeleton-init-systemd/skeleton-init-systemd.mk
index 30783dfd26..fb15552f99 100644
--- a/package/skeleton-init-systemd/skeleton-init-systemd.mk
+++ b/package/skeleton-init-systemd/skeleton-init-systemd.mk
@@ -23,15 +23,15 @@ endef
else
+define SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW
+ echo "/dev/root / auto ro 0 1" >$(TARGET_DIR)/etc/fstab
+endef
+
# On a R/O rootfs, /var is a tmpfs filesystem. So, at build time, we
# redirect /var to the "factory settings" location. Just before the
# filesystem gets created, the /var symlink will be replaced with
# a real (but empty) directory, and the "factory files" will be copied
# back there by the tmpfiles.d mechanism.
-define SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW
- echo "/dev/root / auto ro 0 1" >$(TARGET_DIR)/etc/fstab
-endef
-
ifeq ($(BR2_INIT_SYSTEMD_VAR_FACTORY),y)
define SKELETON_INIT_SYSTEMD_PRE_ROOTFS_VAR
rm -rf $(TARGET_DIR)/usr/share/factory/var
More information about the buildroot
mailing list