From 77be704ad77d34bf8682f342ddf7731c456c9e0e Mon Sep 17 00:00:00 2001 From: "Milton D. Miller II" Date: Mon, 29 Feb 2016 12:10:34 -0600 Subject: 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 --- .../obmc-phosphor-initfs/files/obmc-init.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'meta-phosphor') 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 -- cgit v1.2.1