[PATCH 08/11] defaultenv-2: add ifdown support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Sep 7 08:13:34 EDT 2012


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 defaultenv-2/base/bin/ifdown |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 defaultenv-2/base/bin/ifdown

diff --git a/defaultenv-2/base/bin/ifdown b/defaultenv-2/base/bin/ifdown
new file mode 100644
index 0000000..191144e
--- /dev/null
+++ b/defaultenv-2/base/bin/ifdown
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+mkdir -p /tmp/network
+
+if [ $# != 1 ]; then
+	echo "usage: ifdown <interface>"
+	exit 1
+fi
+
+interface="$1"
+
+
+if [ -f /tmp/network/$interface ]; then
+	rm /tmp/network/$interface
+	exit 0
+fi
-- 
1.7.10.4




More information about the barebox mailing list