diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-11-15 02:55:17 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-11-15 02:55:17 +0000 |
commit | 78431965205eb0f1fe8a0e240dcc2c20940fb1dd (patch) | |
tree | ea4f72e53a7f7ffc82e4a307de9cc80e939de3f7 /sources | |
parent | cad581084a1d85f4fb88b466e6f36ad0128754f0 (diff) | |
download | buildroot-novena-78431965205eb0f1fe8a0e240dcc2c20940fb1dd.tar.gz buildroot-novena-78431965205eb0f1fe8a0e240dcc2c20940fb1dd.zip |
Add udhcp, cleanup a few other loose ends.
-Erik
Diffstat (limited to 'sources')
-rw-r--r-- | sources/target_skeleton/etc/TZ | 1 | ||||
-rw-r--r-- | sources/target_skeleton/etc/inittab | 14 | ||||
-rwxr-xr-x | sources/target_skeleton/usr/share/udhcpc/default.script | 39 |
3 files changed, 49 insertions, 5 deletions
diff --git a/sources/target_skeleton/etc/TZ b/sources/target_skeleton/etc/TZ new file mode 100644 index 000000000..9fcb2a3c5 --- /dev/null +++ b/sources/target_skeleton/etc/TZ @@ -0,0 +1 @@ +MST7MDT diff --git a/sources/target_skeleton/etc/inittab b/sources/target_skeleton/etc/inittab index 8575ced99..f31089f13 100644 --- a/sources/target_skeleton/etc/inittab +++ b/sources/target_skeleton/etc/inittab @@ -17,20 +17,24 @@ ::sysinit:/etc/init.d/rcS # Set up a couple of getty's -tty1::respawn:/sbin/getty 38400 tty1 -tty2::respawn:/sbin/getty 38400 tty2 +tty1::respawn:/sbin/getty 38400 tty2 +tty2::respawn:/sbin/getty 38400 tty3 # Put a getty on the serial port #ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # Logging junk -tty3::once:/bin/touch /var/log/messages -tty3::respawn:/usr/bin/tail -f /var/log/messages -::respawn:/sbin/klogd -n +null::sysinit:/bin/touch /var/log/messages +null::respawn:/sbin/syslogd -n -m 0 +null::respawn:/sbin/klogd -n +tty4::respawn:/usr/bin/tail -f /var/log/messages # Stuff to do for the 3-finger salute ::ctrlaltdel:/sbin/reboot # Stuff to do before rebooting +null::shutdown:/usr/bin/killall klogd +null::shutdown:/usr/bin/killall syslogd null::shutdown:/bin/umount -a -r null::shutdown:/sbin/swapoff -a + diff --git a/sources/target_skeleton/usr/share/udhcpc/default.script b/sources/target_skeleton/usr/share/udhcpc/default.script new file mode 100755 index 000000000..a52a7f812 --- /dev/null +++ b/sources/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 |