initfs: update: no error if no files to copy to ram
If the saved files directory is empty because there were no files in
the read-write overlay file system that were in the persistent file
list, then the save directory will not exist, so skip copying the
non-existant directory in that case.
Signed-off-by: Milton Miller <miltonm@us.ibm.com>
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 f8e551c..f0ca989 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
@@ -144,7 +144,7 @@
flashcp -v $f /dev/$m && rm $f
done
-if test "x$toram" = xy
+if test -d $save -a "x$toram" = xy
then
mkdir -p $upper
cp -rp $save/. $upper/