From 5d46a9bb79cb1430bbb96311ed94dae0a22f30ac Mon Sep 17 00:00:00 2001 From: David Anders Date: Thu, 19 Jan 2006 13:51:23 +0000 Subject: add Sharp LH79520 based LNode80 target --- .../usr/share/udhcpc/default.script | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 target/device/Sharp/LNode80/target_skeleton/usr/share/udhcpc/default.script (limited to 'target/device/Sharp/LNode80/target_skeleton/usr/share') diff --git a/target/device/Sharp/LNode80/target_skeleton/usr/share/udhcpc/default.script b/target/device/Sharp/LNode80/target_skeleton/usr/share/udhcpc/default.script new file mode 100644 index 000000000..a52a7f812 --- /dev/null +++ b/target/device/Sharp/LNode80/target_skeleton/usr/share/udhcpc/default.script @@ -0,0 +1,39 @@ +#!/bin/sh + +# udhcpc script edited by Tim Riker + +[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 + +RESOLV_CONF="/etc/resolv.conf" +[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" +[ -n "$subnet" ] && NETMASK="netmask $subnet" + +case "$1" in + deconfig) + /sbin/ifconfig $interface 0.0.0.0 + ;; + + renew|bound) + /sbin/ifconfig $interface $ip $BROADCAST $NETMASK + + if [ -n "$router" ] ; then + echo "deleting routers" + while route del default gw 0.0.0.0 dev $interface ; do + : + done + + for i in $router ; do + route add default gw $i dev $interface + done + fi + + echo -n > $RESOLV_CONF + [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF + for i in $dns ; do + echo adding dns $i + echo nameserver $i >> $RESOLV_CONF + done + ;; +esac + +exit 0 -- cgit v1.2.3