#!/bin/sh # Event script for udhcpc case $1 in deconfig) ifconfig $interface 0.0.0.0 ;; bound|renew) ifconfig $interface $ip netmask $subnet route add default gw $router echo -n > /etc/resolv.conf [ -z "$domain" ] || echo "domain $domain" >> /etc/resolv.conf for n in $dns; do echo "nameserver $n" >> /etc/resolv.conf; done if [ ! -z "$hostname" ]; then echo $hostname > /etc/hostname hostname $hostname fi ;; esac