mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Reilly <marc@cpdesign.com.au>
To: barebox@lists.infradead.org
Subject: handling script/init errors
Date: Tue, 12 Nov 2013 17:07:35 +1100	[thread overview]
Message-ID: <3749329.nT9HWVKCSz@dev2.cpdesign> (raw)

Hi,

Rarely, one of the commands (related to hardware access) in our startup 
scripts fails, and the unit startup ends up bailing to a console prompt. 
(Which is only on debug port, so no appropriate user feedback) 
This would end up appearing to the user that nothing has happened, and will 
either run until batteries are drained (or removed) or a special reset 
sequence is done.

Is there a way to set up an error handler in the scripts? Ideally, a command 
or script that could be called if /bin/sh encounters an error. 

I started looking through hush.c but soon thought it better to consult with 
anyone who actually might know ... :)

It's not an urgent problem, as all the troublesome units so far present 
themselves before they're shipped out, but now a more urgent (thankfully 
simple) problem has emerged, so now is a good time to try fix it.

Note: we're using a version based of 2012.07

Cheers,
Marc

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2013-11-12  6:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12  6:07 Marc Reilly [this message]
2013-11-12  8:28 ` Sascha Hauer
2013-11-12  9:05   ` Marc Reilly
2013-11-12 10:11     ` Sascha Hauer
2013-11-13  6:51       ` Marc Reilly
2013-11-18  9:40         ` Sascha Hauer

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=3749329.nT9HWVKCSz@dev2.cpdesign \
    --to=marc@cpdesign.com.au \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox