2011-03-18 12:18:52 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2016-02-09 20:19:31 +00:00
|
|
|
PACKAGE=runtime
|
2017-03-04 11:33:01 +00:00
|
|
|
DIST= ${SRCTOP}/contrib/openresolv
|
2011-03-18 12:18:52 +00:00
|
|
|
.PATH: ${DIST}
|
|
|
|
|
|
|
|
SCRIPTS= resolvconf
|
|
|
|
|
2015-05-04 21:07:20 +00:00
|
|
|
FILES= libc dnsmasq named pdnsd pdns_recursor unbound
|
2011-03-18 12:18:52 +00:00
|
|
|
FILESDIR= /libexec/resolvconf
|
|
|
|
|
|
|
|
MAN= resolvconf.conf.5 resolvconf.8
|
|
|
|
|
|
|
|
CLEANFILES= ${SCRIPTS} ${FILES} ${MAN}
|
|
|
|
|
|
|
|
SYSCONFDIR= /etc
|
|
|
|
RCDIR= ${SYSCONFDIR}/rc.d
|
|
|
|
VARDIR= /var/run/resolvconf
|
2016-08-23 02:06:20 +00:00
|
|
|
SBINDIR= /sbin
|
2011-03-18 12:18:52 +00:00
|
|
|
|
|
|
|
# We don't assume to restart the services in /sbin. So, though
|
|
|
|
# our service(8) is in /usr/sbin, we can use it, here.
|
2017-02-03 16:08:58 +00:00
|
|
|
CMD1= \\$$1 onestatus >/dev/null 2>\&1
|
|
|
|
CMD2= \\$$1 restart
|
|
|
|
RESTARTCMD= "/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}"
|
2011-03-18 12:18:52 +00:00
|
|
|
|
|
|
|
.for f in ${SCRIPTS} ${FILES} ${MAN}
|
|
|
|
${f}: ${f}.in
|
2016-08-23 02:06:20 +00:00
|
|
|
sed -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \
|
2011-03-18 12:18:52 +00:00
|
|
|
-e 's:@LIBEXECDIR@:${FILESDIR}:g' \
|
|
|
|
-e 's:@VARDIR@:${VARDIR}:g' \
|
2017-02-03 16:08:58 +00:00
|
|
|
-e 's:@RESTARTCMD@:${RESTARTCMD}:g' \
|
2011-03-18 12:18:52 +00:00
|
|
|
-e 's:@RCDIR@:${RCDIR}:g' \
|
2016-08-23 02:06:20 +00:00
|
|
|
-e 's:@SBINDIR@:${SBINDIR}:g' \
|
2011-03-18 12:18:52 +00:00
|
|
|
-e 's: vpn : ng[0-9]*&:g' \
|
|
|
|
${DIST}/$@.in > $@
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|