diff options
author | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2008-07-03 08:27:50 +0000 |
---|---|---|
committer | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2008-07-03 08:27:50 +0000 |
commit | e27fef51834042a1b108e04927a2a91742a54327 (patch) | |
tree | fd0179bb0da69ac3d7c69f7aac2f8c9ef7cb961a /target/device/KwikByte/kb9202/target_skeleton/usr | |
parent | 41e6a671f3cc284da7dc32eb96e257265d233893 (diff) |
Add support for KwikByte KB9202 board, courtesy Brian Beattie
Diffstat (limited to 'target/device/KwikByte/kb9202/target_skeleton/usr')
-rwxr-xr-x | target/device/KwikByte/kb9202/target_skeleton/usr/share/udhcpc/default.script | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/device/KwikByte/kb9202/target_skeleton/usr/share/udhcpc/default.script b/target/device/KwikByte/kb9202/target_skeleton/usr/share/udhcpc/default.script new file mode 100755 index 000000000..98ebc159f --- /dev/null +++ b/target/device/KwikByte/kb9202/target_skeleton/usr/share/udhcpc/default.script @@ -0,0 +1,40 @@ +#!/bin/sh + +# udhcpc script edited by Tim Riker <Tim@Rikers.org> + +[ -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 + + metric=0 + for i in $router ; do + route add default gw $i dev $interface metric $((metric++)) + 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 |