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

(-)/usr/local/etc/rc.d/named (+20 lines)
Lines 60-65 Link Here
60
_named_confdirroot="${named_conf%/*}"
60
_named_confdirroot="${named_conf%/*}"
61
_named_confdir="${named_chrootdir}${_named_confdirroot}"
61
_named_confdir="${named_chrootdir}${_named_confdirroot}"
62
_named_program_root="${named_program%/sbin/named}"
62
_named_program_root="${named_program%/sbin/named}"
63
_named_libdir="/usr/local/lib/named"
63
_openssl_engines="/usr/lib/engines"
64
_openssl_engines="/usr/lib/engines"
64
65
65
# Needed if named.conf and rndc.conf are moved or if rndc.conf is used
66
# Needed if named.conf and rndc.conf are moved or if rndc.conf is used
Lines 155-160 Link Here
155
		fi
156
		fi
156
	fi
157
	fi
157
158
159
	# The named libraries should be present in the chroot, named loads them
160
	# after chrooting.
161
	if [ -d ${_named_libdir} ]; then
162
		mkdir -p ${named_chrootdir}${_named_libdir}
163
		if can_mount nullfs ; then
164
			mount -t nullfs ${_named_libdir} ${named_chrootdir}${_named_libdir}
165
		else
166
			warn "named chroot: cannot nullfs mount named" \
167
				"libraries into the chroot, will copy the shared" \
168
				"libraries instead."
169
			cp -f ${_named_libdir}/*.so ${named_chrootdir}${_named_libdir}
170
		fi
171
	fi
172
158
	# Copy and/or update key files to the chroot /etc
173
	# Copy and/or update key files to the chroot /etc
159
	#
174
	#
160
	for file in localtime protocols services; do
175
	for file in localtime protocols services; do
Lines 242-247 Link Here
242
		if [ -d ${_openssl_engines} ]; then
257
		if [ -d ${_openssl_engines} ]; then
243
			if can_mount nullfs; then
258
			if can_mount nullfs; then
244
				umount ${named_chrootdir}${_openssl_engines}
259
				umount ${named_chrootdir}${_openssl_engines}
260
			fi
261
		fi
262
		if [ -d ${_named_libdir} ]; then
263
			if can_mount nullfs; then
264
				umount ${named_chrootdir}${_named_libdir}
245
			fi
265
			fi
246
		fi
266
		fi
247
		if [ -c ${named_chrootdir}/dev/null ]; then
267
		if [ -c ${named_chrootdir}/dev/null ]; then

Return to bug 238011