File: udhcpc.script

package info (click to toggle)
nslu2-utils 0.10%2Br71-9
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 304 kB
  • ctags: 5
  • sloc: sh: 2,408; perl: 780; makefile: 56
file content (17 lines) | stat: -rw-r--r-- 452 bytes parent folder | download | duplicates (3)
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