summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton D. Miller II <miltonm@us.ibm.com>2016-02-29 12:10:34 -0600
committerMilton D. Miller II <miltonm@us.ibm.com>2016-03-07 15:20:18 -0600
commit77be704ad77d34bf8682f342ddf7731c456c9e0e (patch)
treefbe1b43d4df475f65378a5f54dede39dbf4555a4
parent383bfc7b1fd06f583b40f96bd4c9aa09faacc4b9 (diff)
downloadtalos-openbmc-77be704ad77d34bf8682f342ddf7731c456c9e0e.tar.gz
talos-openbmc-77be704ad77d34bf8682f342ddf7731c456c9e0e.zip
init: Add option to copy files into memory
Add an option to copy files from the rwfs to ram then run in ram. This allows customizations like user ids and network settings to be initialized from the read-write filesystem. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
-rw-r--r--meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
index b4d156945..9aa2131d2 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
@@ -169,6 +169,21 @@ then
rwfst=none
fi
+copyfiles=
+if grep -w copy-files-to-ram $optfile
+then
+ rwfst=none
+ copyfiles=y
+fi
+
+# It would be nice to do this after fsck but that mean rofs is mounted
+# which triggers the mtd is mounted check
+if test "$rwfst$copyfiles" = noney
+then
+ touch $trigger
+ $update --copy-files --clean-saved-files --no-restore-files
+fi
+
if grep -w copy-base-filesystem-to-ram $optfile &&
test ! -e /run/image-rofs && ! cp $rodev /run/image-rofs
then
OpenPOWER on IntegriCloud