[PATCH] defaultenv-2 ifup: create network up state file for dhcp
Sascha Hauer
s.hauer at pengutronix.de
Sun Jun 24 07:31:01 EDT 2012
We store the 'up' status of a network device in /tmp/network/$interface.
Create this file for dhcp aswell to prevent doing dhcp requests each
time ifup is called.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
defaultenv-2/base/bin/ifup | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/defaultenv-2/base/bin/ifup b/defaultenv-2/base/bin/ifup
index 9f6fd6b..4248149 100644
--- a/defaultenv-2/base/bin/ifup
+++ b/defaultenv-2/base/bin/ifup
@@ -51,9 +51,12 @@ if [ "$ip" = static ]; then
${interface}.netmask=$netmask
${interface}.serverip=$serverip
${interface}.gateway=$gateway
+ retval=0
elif [ "$ip" = dhcp ]; then
dhcp
- exit $?
+ retval=$?
fi
echo -o /tmp/network/$interface up
+
+exit $retval
--
1.7.10
More information about the barebox
mailing list