aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dnsmasq/files/dhcp-script.sh
blob: 86032694c156ba08539ca2513c9259dec47c9e46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh

[ -f "$USER_DHCPSCRIPT" ] && . "$USER_DHCPSCRIPT" "$@"

case "$1" in
	add)
		export ACTION="add"
		export MACADDR="$2"
		export IPADDR="$3"
		export HOSTNAME="$4"
		exec /sbin/hotplug-call dhcp
	;;
	del)
		export ACTION="remove"
		export MACADDR="$2"
		export IPADDR="$3"
		export HOSTNAME="$4"
		exec /sbin/hotplug-call dhcp
	;;
	old)
		export ACTION="update"
		export MACADDR="$2"
		export IPADDR="$3"
		export HOSTNAME="$4"
		exec /sbin/hotplug-call dhcp
	;;
	arp-add)
		export ACTION="add"
		export MACADDR="$2"
		export IPADDR="$3"
		exec /sbin/hotplug-call neigh
	;;
	arp-del)
		export ACTION="remove"
		export MACADDR="$2"
		export IPADDR="$3"
		exec /sbin/hotplug-call neigh
	;;
	tftp)
		export ACTION="add"
		export TFTP_SIZE="$2"
		export TFTP_ADDR="$3"
		export TFTP_PATH="$4"
		exec /sbin/hotplug-call tftp
	;;
esac