[PATCH 3/3] default environment: force a specific return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux