Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 601510 | Differences between
and this patch

Collapse All | Expand All

(-)named_orig (-4 / +7 lines)
Lines 120-125 Link Here
120
120
121
	ebegin "Starting ${CHROOT:+chrooted }named"
121
	ebegin "Starting ${CHROOT:+chrooted }named"
122
122
123
	# moved initialization of piddir to top, to prevent uninialized use of piddir below!
124
	# create piddir (usually /run/named) if necessary, bug 334535
125
	_get_pidfile
126
	piddir="${PIDFILE%/*}"
127
123
	if [ -n "${CHROOT}" ]; then
128
	if [ -n "${CHROOT}" ]; then
124
		if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then
129
		if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then
125
			check_chroot || {
130
			check_chroot || {
Lines 160-168 Link Here
160
165
161
	checkconfig || { eend 1; return 1; }
166
	checkconfig || { eend 1; return 1; }
162
167
163
	# create piddir (usually /run/named) if necessary, bug 334535
164
	_get_pidfile
165
	piddir="${PIDFILE%/*}"
166
	checkpath -q -d -o root:named -m 0770 "${piddir}" || {
168
	checkpath -q -d -o root:named -m 0770 "${piddir}" || {
167
		eerror "Failed to create PID directory at $piddir"
169
		eerror "Failed to create PID directory at $piddir"
168
		eend 1
170
		eend 1
Lines 202-208 Link Here
202
204
203
	# -R 10, bug 335398
205
	# -R 10, bug 335398
204
	_get_pidfile
206
	_get_pidfile
205
	start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \
207
	# Hack to work around the strange fact that start-stop-daemon is using the argument of --pidfile to be inside of the chroot at start but not on stop
208
	start-stop-daemon --stop --retry 10 --pidfile ${CHROOT}/$PIDFILE \
206
		--exec /usr/sbin/named
209
		--exec /usr/sbin/named
207
210
208
	if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
211
	if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then

Return to bug 601510