summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Kawajiri <kawajiri@meta.com>2024-04-18 17:20:00 +0300
committerPatrick Williams <patrick@stwcx.xyz>2024-04-19 23:59:13 +0300
commitd60b987c45bd8b3a7ce16e2c2795a8d740cf9248 (patch)
tree80b2f2fa559be2040523d4c931e2805ff527e13e
parent766552da26a328eb170e6d6ad12249baa43a07a1 (diff)
downloadopenbmc-d60b987c45bd8b3a7ce16e2c2795a8d740cf9248.tar.xz
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 <kawajiri@meta.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
-rw-r--r--meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init.bb7
1 files changed, 6 insertions, 1 deletions
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