summaryrefslogtreecommitdiffstats
path: root/regress/sys/netinet/ipsec/nonxt_reflect.sh
blob: a387b583be616dce421bb02b1cb7fac2f1e9b362 (plain) (blame)
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
# $OpenBSD: nonxt_reflect.sh,v 1.1 2018/05/21 01:19:21 bluhm Exp $

if [ -z "$local_addresses" ]; then
	echo no local addresses configured >&2
	exit 1
fi

daemon=/usr/src/regress/sys/netinet/ipsec/obj/nonxt-reflect
if ! [ -x $daemon ]; then
	daemon=/usr/src/regress/sys/netinet/ipsec/nonxt-reflect
fi
if ! [ -x $daemon ]; then
	echo executable $daemon not found >&2
	exit 1
fi

. /etc/rc.d/rc.subr

rc_reload=NO

pexp="${daemon}${daemon_flags:+ ${daemon_flags}} [0-9a-f.:][0-9a-f.:]*"

rc_start() {
	for ip in $local_addresses; do
		${rcexec} "${daemon} ${daemon_flags} $ip"
	done
}

rc_cmd $1