All of lore.kernel.org
 help / color / mirror / Atom feed
From: OpenBMC Patches <openbmc-patches@stwcx.xyz>
To: openbmc@lists.ozlabs.org
Subject: [PATCH openbmc v2 1/7] initfs: shutdown: comment on update success
Date: Wed, 25 May 2016 19:30:28 -0500	[thread overview]
Message-ID: <20160526003034.30491-2-openbmc-patches@stwcx.xyz> (raw)
In-Reply-To: <20160526003034.30491-1-openbmc-patches@stwcx.xyz>

From: "Milton D. Miller II" <miltonm@us.ibm.com>

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>
---
 .../recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh  | 8 ++++++++
 1 file changed, 8 insertions(+)

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 8d5d0c9..8d5c672 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
-- 
2.8.3

  reply	other threads:[~2016-05-26  0:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  0:30 [PATCH openbmc v2 0/7] Update flash update to be useable at runtime OpenBMC Patches
2016-05-26  0:30 ` OpenBMC Patches [this message]
2016-05-26  0:30 ` [PATCH openbmc v2 2/7] initfs: update: Don't exec sh or sulogin on error just exit 1 OpenBMC Patches
2016-05-26  0:30 ` [PATCH openbmc v2 3/7] initfs: update: no error if no files to copy to ram OpenBMC Patches
2016-05-26  0:30 ` [PATCH openbmc v2 4/7] initfs: update: add option to perform checks but skip actual update OpenBMC Patches
2016-05-26  0:30 ` [PATCH openbmc v2 5/7] initfs: update: check individual mtd partitions for mounts OpenBMC Patches
2016-05-26  0:30 ` [PATCH openbmc v2 6/7] initfs: update: add check for image size vs mtd size OpenBMC Patches
2016-05-26  0:30 ` [PATCH openbmc v2 7/7] initfs: init: add file for base options OpenBMC Patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160526003034.30491-2-openbmc-patches@stwcx.xyz \
    --to=openbmc-patches@stwcx.xyz \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.