#!/bin/sh case "${1}" in 'deconfig') /sbin/ifconfig "${interface}" 0.0.0.0 ;; 'renew' | 'bound') /sbin/ifconfig "${interface}" "${ip}" \ ${broadcast+broadcast ${broadcast}} \ ${netmask+netmask ${netmask}} if [ "x${router+set}" = 'xset' ]; then while /sbin/route del default gw 0.0.0.0 \ dev "${interface}" 2>/dev/null; do : done for router in ${router}; do /sbin/route add default gw "${router}" \ dev "${interface}" done fi exec 3>'/etc/resolv.conf' if [ "x${domain+set}" = 'xset' ]; then printf 'search %s\n' "${domain}" >&3 fi for dns in ${dns}; do printf 'nameserver %s\n' "${dns}" >&3 done exec 3>&- ;; esac exit 0