aboutsummaryrefslogtreecommitdiff
path: root/target/device/Atmel/atngw100/target_skeleton/usr/share/udhcpc/default.script
blob: 56cbaf6c43df05db3026d46e8689e7deee9dbf63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh


case $1 in
    deconfig)
	ifconfig $interface 0.0.0.0
	;;
    bound|renew)
	ifconfig $interface $ip netmask $subnet broadcast $broadcast
	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