View | Details | Raw Unified | Return to bug 180324
Collapse All | Expand All

(-)ipv6mon/files/ipv6mon.in (-2 / +40 lines)
Lines 6-18 Link Here
6
# BEFORE: LOGIN
6
# BEFORE: LOGIN
7
# KEYWORD: nojail shutdown
7
# KEYWORD: nojail shutdown
8
8
9
# To use ipv6mon with multiple interfaces, the following additional steps
10
# are needed (example with 2 interfaces, em0 and em1):
11
# 
12
# Copy the %%PREFIX%%/etc/ipv6mon.conf to %%PREFIX%%/etc/ipv6mon-em0.conf and
13
# to %%PREFIX%%/etc/ipv6mon-em1.conf
14
# In both copied config files adjust 'NetworkInterface' accordingly with em0
15
# and em1 and also adjust the 'LockFile' accordingly to
16
# /var/run/ipv6mon-em0.pid and /var/run/ipv6mon-em1.pid.
17
# Add in /etc/rc.conf the additional line:
18
# ipv6mon_interfaces="em0 em1"
19
20
9
. /etc/rc.subr
21
. /etc/rc.subr
10
22
11
name="ipv6mon"
23
name="ipv6mon"
12
rcvar="${name}_enable"
24
rcvar="${name}_enable"
13
command="%%PREFIX%%/sbin/${name}"
25
command="%%PREFIX%%/sbin/${name}"
14
pidfile="/var/run/${name}.pid"
15
required_files="%%PREFIX%%/etc/${name}.conf"
26
required_files="%%PREFIX%%/etc/${name}.conf"
16
27
17
load_rc_config $name
28
load_rc_config $name
18
run_rc_command "$1"
29
30
case ${ipv6mon_interfaces} in
31
	'')  
32
		pidfile="/var/run/${name}.pid"
33
		run_rc_command "$1"
34
	;;
35
36
	*)
37
		case "$1" in
38
			*start)
39
				for interface in ${ipv6mon_interfaces}; do
40
				eval options=\$ipv6mon_${interface}_options
41
				command_args="${options} -c %%PREFIX%%/etc/${name}-${interface}.conf"
42
				pidfile="/var/run/${name}-${interface}.pid"
43
				run_rc_command "$1"
44
				done
45
			;;
46
47
			*stop)
48
				for interface in ${ipv6mon_interfaces}; do
49
				eval options=\$ipv6mon_${interface}_options
50
				pidfile="/var/run/${name}-${interface}.pid"
51
				run_rc_command "$1"
52
				done
53
			;;
54
		esac
55
	;;
56
esac

Return to bug 180324