From 17c473856ee1c0da49ac3264dbc0d52040430116 Mon Sep 17 00:00:00 2001 From: Milton Miller Date: Mon, 23 May 2016 18:44:30 -0500 Subject: 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 --- .../recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'meta-phosphor') 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 -- cgit v1.2.1