[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: net image full



> #!/bin/sh
> # udhcpc script using iproute by Erik Andersen <andersee@debian.org>
> 
> [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
> RESOLV_CONF="/etc/resolv.conf"
> 
> 
> case "$1" in
>         deconfig)
> 		/bin/ip link set $interface up
>                 ;;
> 
>         renew|bound)
 		/bin/ip addr flush dev $interface
> 		/bin/ip addr add $ip/$mask dev $interface
> 
> 		if [ -n "$router" ] ; then
	 		/bin/ip route flush match 0 dev $interface
> 			for i in $router ; do
> 				/bin/ip route add default via $i dev $interface
> 			done
> 		fi
> 
> 		if [ -n "$hostname" ]; then
> 			hostname $hostname
> 		fi
> 
> 		echo "# Generated automatically by udhcpc" > $RESOLV_CONF
> 		echo "" >> $RESOLV_CONF
> 		if [ -n "$domain" ] ; then
> 			echo search $domain >> $RESOLV_CONF
> 		fi
>                 for i in $dns ; do
>                         echo nameserver $i >> $RESOLV_CONF
>                 done
>                 ;;  
> esac
> exit 0

-- 
It is necessary to have purpose.
		-- Alice #1, "I, Mudd", stardate 4513.3

Attachment: pgpxcrDdUMaSn.pgp
Description: PGP signature


Reply to: