summaryrefslogtreecommitdiff
path: root/recipes/openprotium-init/files/boot/udhcpc.script
blob: 3f437e314311650aef24334a2c35d9aed1e31b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
# executed by udhcpc to do the real work of configuring an interface
# writes the result (if any) to file descriptor 9
case "$1" in
deconfig)	# ignored
	:;;
renew|bound)	# this gives the real information
	test -n "$ip" && {
		echo "ip='$ip'"
		echo "subnet='$subnet'"
		echo "broadcast='$broadcast'"
		echo "router='$router'"
	} >&9;;
leasefail)	# ignore - probably no dhcp server
	:;;
*)	echo "udhcpc: $*: command not recognised" >&2;;
esac