aboutsummaryrefslogtreecommitdiff
path: root/examples/var_service/ifplugd_if/ifplugd_handler
blob: 0749019f1a1f0a1653579f8445767f34739fa975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# parameters:
# $1: interface
# $2: state

if test x"$2" = x"down"; then
	echo "Downing dhcp_$1"
	svc -d "dhcp_$1"
	echo "Downing zcip_$1"
	svc -d "zcip_$1"
fi
if test x"$2" = x"up"; then
	echo "Upping dhcp_$1"
	svc -u "dhcp_$1"
	echo "Upping zcip_$1"
	svc -u "zcip_$1"
fi
# Parent ifplugd exits if we exit with nonzero.
# Do not startle it:
exit 0