[PATCH openbmc v2 13/34] update: Make cow directory before restoring saved files.
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Mar 8 08:30:02 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
This will ensure the cp command always writes to an existing
directory but will also make any future component directories if
the upper directory is later moved from the root of the filesystem.
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
.../common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
index cab33e9..1a11953 100755
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
@@ -138,6 +138,7 @@ then
mkdir -p $rwdir
mount $rwdev $rwdir -t $(probe_fs_type $rwdev) -o $rwopts
+ mkdir -p $upper
cp -rp $save/. $upper/
umount $rwdir
rmdir $rwdir
--
2.7.1
More information about the openbmc
mailing list