diff options
author | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2007-07-17 12:19:56 +0000 |
---|---|---|
committer | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2007-07-17 12:19:56 +0000 |
commit | a1e6a84bb32d2c691103ee7548506c6bb68cb101 (patch) | |
tree | 5ca9341704f781305ce6350d26c00d5a879bbd06 /target/device/Atmel/root/target_skeleton/usr | |
parent | 431e0223da18b1e2efc40d7bf96f1509087c1221 (diff) | |
download | buildroot-novena-a1e6a84bb32d2c691103ee7548506c6bb68cb101.tar.gz buildroot-novena-a1e6a84bb32d2c691103ee7548506c6bb68cb101.zip |
Add AT91 targets
Diffstat (limited to 'target/device/Atmel/root/target_skeleton/usr')
-rwxr-xr-x | target/device/Atmel/root/target_skeleton/usr/share/udhcpc/default.script | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/target/device/Atmel/root/target_skeleton/usr/share/udhcpc/default.script b/target/device/Atmel/root/target_skeleton/usr/share/udhcpc/default.script new file mode 100755 index 000000000..a52a7f812 --- /dev/null +++ b/target/device/Atmel/root/target_skeleton/usr/share/udhcpc/default.script @@ -0,0 +1,39 @@ +#!/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 + + 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 |