summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton Miller <miltonm@us.ibm.com>2016-05-23 18:44:30 -0500
committerMilton Miller <miltonm@us.ibm.com>2016-06-30 14:46:41 -0500
commit17c473856ee1c0da49ac3264dbc0d52040430116 (patch)
treeaef55b03158886c9197e2fe51fbe21cf9a4fff64
parentf6be0985a4dc16435dae46a60437554b5d129163 (diff)
downloadtalos-openbmc-17c473856ee1c0da49ac3264dbc0d52040430116.tar.gz
talos-openbmc-17c473856ee1c0da49ac3264dbc0d52040430116.zip
initfs: shutdown: comment on update success
Print an error from the shutdown script when the update fails. Update is changing to return codes when its preconditions are not met, so be more verbose about its success to provide a means to debug flash updates not occurring. We could add a sulogin or sushell but its not clear what would be desired here. If so the message should include "rmdir /oldroot to get a PID 1 shell" like /takever works in init. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
-rw-r--r--meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh8
1 files changed, 8 insertions, 0 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 8d5d0c983..8d5c6726c 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
@@ -44,6 +44,14 @@ then
if test -x $update
then
$update --clean-saved-files
+ remaining=$(ls $image*)
+ if test -n "$remaining"
+ then
+ echo 1>&2 "Flash update failed to flash these images:"
+ echo 1>&2 "$remaining"
+ else
+ echo "Flash update completed."
+ fi
else
echo 1>&2 "Flash update requested but $update program missing!"
fi
OpenPOWER on IntegriCloud