summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-03-07 09:25:44 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-03-07 09:25:44 +0100
commit144358e0aa102c84968443460c508eb3d65ccc90 (patch)
tree01b9aafde793d1124976ecd2bae090b9b978f8a3 /defaultenv
parente358922a74b01e6272c77caf01bc78a8295cc7d7 (diff)
parent86f681abec4f8485d2e95537e0d59a8d9ab6b546 (diff)
downloadbarebox-144358e0aa102c84968443460c508eb3d65ccc90.tar.gz
Merge branch 'for-next/nfs'
Conflicts: defaultenv/defaultenv-2-base/bin/ifup
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/defaultenv-2-base/bin/ifup67
1 files changed, 0 insertions, 67 deletions
diff --git a/defaultenv/defaultenv-2-base/bin/ifup b/defaultenv/defaultenv-2-base/bin/ifup
deleted file mode 100644
index 37b986c..0000000
--- a/defaultenv/defaultenv-2-base/bin/ifup
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-mkdir -p /tmp/network
-
-if [ $# != 1 ]; then
- echo "usage: ifup <interface>"
- exit 1
-fi
-
-interface="$1"
-
-if [ -f /tmp/network/$interface ]; then
- exit 0
-fi
-
-cmd=/env/network/$interface
-
-if [ ! -e $cmd ]; then
- echo "$f: no such file"
- exit 1
-fi
-
-ip=
-ipaddr=
-netmask=
-gateway=
-serverip=
-ethaddr=
-
-. $cmd
-
-if [ $? != 0 ]; then
- echo "failed to bring up $interface"
- exit 1
-fi
-
-if [ -f /env/network/${interface}-discover ]; then
- /env/network/${interface}-discover
- if [ $? != 0 ]; then
- echo "failed to discover eth0"
- exit 1
- fi
-fi
-
-if [ -n "$ethaddr" ]; then
- ${interface}.ethaddr=$ethaddr
-fi
-
-if [ "$ip" = static ]; then
- ${interface}.ipaddr=$ipaddr
- ${interface}.netmask=$netmask
- ${interface}.serverip=$serverip
- ${interface}.gateway=$gateway
- ret=0
-elif [ "$ip" = dhcp ]; then
- dhcp
- ret=$?
- if [ $ret = 0 -a -n "$serverip" ]; then
- ${interface}.serverip=$serverip
- fi
-fi
-
-if [ $ret = 0 ]; then
- echo -o /tmp/network/$interface up
-fi
-
-exit $ret