[PATCH openbmc 26/32] init: Be explicit about saving and restoring files.
OpenBMC Patches
openbmc-patches at stwcx.xyz
Sat Mar 5 23:30:17 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
When calling update for save and restore phases be explicitly tell
update to clean saved files when we are done and not bother trying
to save or restore when we know we will do a split save, erase, and
restore sequence.
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
.../recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh | 7 +++----
1 file changed, 3 insertions(+), 4 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 82cc77e..725c19c 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
@@ -149,15 +149,14 @@ then
elif test -f $trigger -a ! -s $trigger
then
echo "Saving selected files from read-write overlay filesystem."
- /update && rm -f $image*
+ /update --no-restore-files
echo "Clearing read-write overlay filesystem."
flash_eraseall /dev/$rwfs
echo "Restoring saved files to read-write overlay filesystem."
touch $trigger
- /update
- rm -rf /save $trigger
+ /update --no-save-files --clean-saved-files
else
- /update && rm -f $image*
+ /update --clean-saved-files
fi
rwfst=$(probe_fs_type $rwdev)
--
2.7.1
More information about the openbmc
mailing list