From d60b987c45bd8b3a7ce16e2c2795a8d740cf9248 Mon Sep 17 00:00:00 2001 From: Marco Kawajiri Date: Thu, 18 Apr 2024 07:20:00 -0700 Subject: meta-phosphor: phosphor-static-norootfs-init: add home as persistent In order to allow users other than root to be created, home needs to be writable. Add it to the persistence list. Since sometimes root's home is in `/home` and sometimes it is in `/root`, also add logic to detect where `ROOT_HOME` is and also add it if it is outside of `/home` Tested: `bitbake phosphor-static-norootfs-init -ne` with ROOT_HOME in `/root` and in `/home/root`: NOROOTFS_PERSISTENT_DIRS=" var etc home root mnt/data" NOROOTFS_PERSISTENT_DIRS=" var etc home mnt/data" Change-Id: I1a389a3546409b2fe888f47ebd49c0d3e43c13bb Signed-off-by: Marco Kawajiri Signed-off-by: Patrick Williams --- .../initrdscripts/phosphor-static-norootfs-init.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init.bb b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init.bb index 3d193bc436..fd7a9bf190 100644 --- a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init.bb +++ b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init.bb @@ -19,7 +19,12 @@ SRC_URI += "\ S = "${WORKDIR}" -NOROOTFS_PERSISTENT_DIRS = "var etc ${@ d.getVar('ROOT_HOME')[1:]}" +NOROOTFS_PERSISTENT_DIRS = "\ + var \ + etc \ + home \ + ${@ bb.utils.contains('ROOT_HOME', '/home/root', '', d.getVar('ROOT_HOME')[1:], d)} \ + " inherit allarch inherit update-alternatives -- cgit v1.2.3