mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] default environment: force a specific return value
Date: Wed, 23 Apr 2014 11:19:26 +0200	[thread overview]
Message-ID: <1398244766-5843-4-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1398244766-5843-1-git-send-email-jbe@pengutronix.de>

Since commit a162dfe50345d3461010759f8a0e79f7e388c140 the ifup command runs
this file as a script. Due to a hush misbehave it could happen it returns
an error code by accident.

For example if the last instructions in this file are:

 if [ false ]; then
    echo "friesel"
 fi

the hush returns 1 after running this script instead of 0 and in this case
the ifup command fails.

I know, the correct fix would be to fix the hush, because it is a generic
issue...but how?

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 defaultenv/defaultenv-2-base/network/eth0 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/defaultenv/defaultenv-2-base/network/eth0 b/defaultenv/defaultenv-2-base/network/eth0
index 7e731ca..33fe7c1 100644
--- a/defaultenv/defaultenv-2-base/network/eth0
+++ b/defaultenv/defaultenv-2-base/network/eth0
@@ -14,3 +14,5 @@ serverip=
 #ethaddr=xx:xx:xx:xx:xx:xx
 
 # put code to discover eth0 (i.e. 'usb') to /env/network/eth0-discover
+
+exit 0
-- 
1.9.1


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

  parent reply	other threads:[~2014-04-23  9:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23  9:19 Fix some ifup related network issues Juergen Borleis
2014-04-23  9:19 ` [PATCH 1/3] net/ifup.c: don't fail silently Juergen Borleis
2014-04-23 10:30   ` Sascha Hauer
2014-04-23 10:56     ` Juergen Borleis
2014-04-23  9:19 ` [PATCH 2/3] net/ifup.c: avoid setting the MAC twice Juergen Borleis
2014-04-23  9:19 ` Juergen Borleis [this message]
2014-04-24  7:04 ` Fix some ifup related network issues 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=1398244766-5843-4-git-send-email-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --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