[PATCH openbmc v2 04/34] shutdown: Complain if update images exist without update script
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Mar 8 08:29:53 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
Complain if the update program is missing if flash update images
are present. This is similar to the message in root and will
inform a serial console reader why the update images are not
being applied.
The update script is copied from the initramfs to the run tmpfs
ram file system. It is built and packaged with the init and
shutdown script. It would have been removed, unpackaged, or
init changed for unknown reasons by root or the build system
for this to occur.
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
.../recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh
index 99a7432..bae572b 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh
@@ -37,9 +37,14 @@ then
ln -sn /run/fw_env ${image}u-boot-env
fi
-if test -x /update && ls $image* > /dev/null 2>&1
+if ls $image* > /dev/null 2>&1
then
- /update ${1+"$@"}
+ if test -x /update
+ then
+ /update
+ else
+ echo 1>&2 "Flash update requested but /update program missing!"
+ fi
fi
echo Remaining mounts:
--
2.7.1
More information about the openbmc
mailing list