summaryrefslogtreecommitdiffstats
path: root/defaultenv/defaultenv-2-base/bin/bootargs-ip
diff options
context:
space:
mode:
Diffstat (limited to 'defaultenv/defaultenv-2-base/bin/bootargs-ip')
-rw-r--r--defaultenv/defaultenv-2-base/bin/bootargs-ip11
1 files changed, 11 insertions, 0 deletions
diff --git a/defaultenv/defaultenv-2-base/bin/bootargs-ip b/defaultenv/defaultenv-2-base/bin/bootargs-ip
new file mode 100644
index 0000000..2d4486c
--- /dev/null
+++ b/defaultenv/defaultenv-2-base/bin/bootargs-ip
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# pass either static ip or dhcp to kernel based on barebox settings
+
+. /env/network/eth0
+
+if [ $ip = dhcp ]; then
+ global.linux.bootargs.dyn.ip="ip=dhcp"
+else
+ global.linux.bootargs.dyn.ip="ip=$ipaddr:$serverip:$gateway:$netmask::eth0:"
+fi