summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-12-10 17:01:14 -0200
committerRenato Botelho <renato@netgate.com>2015-12-10 17:01:14 -0200
commita7ed3b08bcfc9de3d1e75679fe9292e5b09aea82 (patch)
tree71acee51f11c433be4c4a51635ce1ea4302ca4b6 /etc
parent54cf5d1b6607c1e6f2cbf32784c33720517bce49 (diff)
parent3bc7f4d78d27696df85e118c07aa5a2630188922 (diff)
downloadFreeBSD-src-a7ed3b08bcfc9de3d1e75679fe9292e5b09aea82.zip
FreeBSD-src-a7ed3b08bcfc9de3d1e75679fe9292e5b09aea82.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'etc')
-rw-r--r--etc/Makefile20
-rw-r--r--etc/periodic/Makefile1
-rwxr-xr-xetc/rc.d/local_unbound27
3 files changed, 35 insertions, 13 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 1927580..c50014d 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -378,26 +378,26 @@ distrib-dirs: ${MTREES:N/*}
.endif
${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
.if ${MK_MAN} != "no"
- cd ${DESTDIR}/usr/share/man; \
+ cd ${DESTDIR}${SHAREDIR}/man; \
for mandir in man*; do \
${INSTALL_SYMLINK} ../$$mandir \
- ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
+ ${DESTDIR}${SHAREDIR}/man/en.ISO8859-1/; \
${INSTALL_SYMLINK} ../$$mandir \
- ${DESTDIR}/usr/share/man/en.UTF-8/; \
+ ${DESTDIR}${SHAREDIR}/man/en.UTF-8/; \
done
.if ${MK_OPENSSL} != "no"
- cd ${DESTDIR}/usr/share/openssl/man; \
+ cd ${DESTDIR}${SHAREDIR}/openssl/man; \
for mandir in man*; do \
${INSTALL_SYMLINK} ../$$mandir \
- ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
+ ${DESTDIR}${SHAREDIR}/openssl/man/en.ISO8859-1/; \
done
.endif
set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
while [ $$# -gt 0 ] ; do \
- ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \
+ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/man/$$1"; \
if [ "${MK_OPENSSL}" != "no" ]; then \
${INSTALL_SYMLINK} "$$2" \
- "${DESTDIR}/usr/share/openssl/man/$$1"; \
+ "${DESTDIR}${SHAREDIR}/openssl/man/$$1"; \
fi; \
shift; shift; \
done
@@ -405,7 +405,7 @@ distrib-dirs: ${MTREES:N/*}
.if ${MK_NLS} != "no"
set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
while [ $$# -gt 0 ] ; do \
- ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
+ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/nls/$$1"; \
shift; shift; \
done
.endif
@@ -413,8 +413,8 @@ distrib-dirs: ${MTREES:N/*}
etc-examples:
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
${BIN1} ${BIN2} nsmb.conf opieaccess \
- ${DESTDIR}/usr/share/examples/etc
+ ${DESTDIR}${SHAREDIR}/examples/etc
${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
- DESTDIR=${DESTDIR}/usr/share/examples
+ DESTDIR=${DESTDIR}${SHAREDIR}/examples
.include <bsd.prog.mk>
diff --git a/etc/periodic/Makefile b/etc/periodic/Makefile
index 8fb56df..a2d9902 100644
--- a/etc/periodic/Makefile
+++ b/etc/periodic/Makefile
@@ -1,5 +1,6 @@
# $FreeBSD$
SUBDIR= daily security weekly monthly
+SUBDIR_PARALLEL=
.include <bsd.subdir.mk>
diff --git a/etc/rc.d/local_unbound b/etc/rc.d/local_unbound
index b826025..0a81e2c 100755
--- a/etc/rc.d/local_unbound
+++ b/etc/rc.d/local_unbound
@@ -17,21 +17,22 @@ rcvar="local_unbound_enable"
command="/usr/sbin/unbound"
extra_commands="anchor configtest reload setup"
start_precmd="local_unbound_prestart"
+start_postcmd="local_unbound_poststart"
reload_precmd="local_unbound_configtest"
anchor_cmd="local_unbound_anchor"
configtest_cmd="local_unbound_configtest"
setup_cmd="local_unbound_setup"
pidfile="/var/run/${name}.pid"
+load_rc_config $name
+
: ${local_unbound_workdir:=/var/unbound}
: ${local_unbound_config:=${local_unbound_workdir}/unbound.conf}
-: ${local_unbound_flags:=-c${local_unbound_config}}
+: ${local_unbound_flags:="-c ${local_unbound_config}"}
: ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf}
: ${local_unbound_anchor:=${local_unbound_workdir}/root.key}
: ${local_unbound_forwarders:=}
-load_rc_config $name
-
do_as_unbound()
{
echo "$@" | su -m unbound
@@ -88,5 +89,25 @@ local_unbound_prestart()
fi
}
+#
+# After starting, wait for Unbound to report that it is ready to avoid
+# race conditions with services which require functioning DNS.
+#
+local_unbound_poststart()
+{
+ local retry=5
+
+ echo -n "Waiting for nameserver to start..."
+ until "${command}-control" status | grep -q "is running" ; do
+ if [ $((retry -= 1)) -eq 0 ] ; then
+ echo " giving up"
+ return 1
+ fi
+ echo -n "."
+ sleep 1
+ done
+ echo " good"
+}
+
load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud