diff options
Diffstat (limited to 'recipes-core-ivi/busybox/files/busybox-udhcpc')
-rw-r--r-- | recipes-core-ivi/busybox/files/busybox-udhcpc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/recipes-core-ivi/busybox/files/busybox-udhcpc b/recipes-core-ivi/busybox/files/busybox-udhcpc new file mode 100644 index 0000000..28ef9e1 --- /dev/null +++ b/recipes-core-ivi/busybox/files/busybox-udhcpc @@ -0,0 +1,25 @@ +#!/bin/sh
+#
+# (c) 2010-2011 Wind River Systems, Inc.
+#
+# Busybox udhcpc init script
+#
+# script to start the udpchc DHCP client on boots where
+# the parameter 'ip=dhcp' was included in the kernel parameters
+
+# ensure the required binaries are present
+[ -x /sbin/udhcpc ] || exit 1
+[ -x /bin/grep ] || exit 1
+[ -x /bin/mount ] || exit 1
+
+# ensure /proc is mounted
+if ! mount | grep -q "/proc "; then
+ exit 2
+fi
+
+rc=0
+if grep -q -E "\bip=dhcp\b" /proc/cmdline; then
+ /sbin/udhcpc -D -s /usr/share/udhcpc/default.script
+ rc=$?
+fi
+exit $rc
|