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

Collapse All | Expand All

(-)dhcpd.orig (-4 / +10 lines)
Lines 14-20 Link Here
14
14
15
get_var() {
15
get_var() {
16
	sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \
16
	sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \
17
		"${DHCPD_CHROOT}/${DHCPD_CONF}"
17
		"${DHCPD_CONF}"
18
}
18
}
19
19
20
checkconfig() {
20
checkconfig() {
Lines 46-53 Link Here
46
			;;
46
			;;
47
	esac
47
	esac
48
48
49
	if [ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ] ; then
49
	if [ ! -f "${DHCPD_CONF}" ] ; then
50
		eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist"
50
		eerror "${DHCPD_CONF} does not exist"
51
		return 1
51
		return 1
52
	fi
52
	fi
53
53
Lines 68-73 Link Here
68
	if [ -n "${DHCPD_CHROOT}" ] ; then
68
	if [ -n "${DHCPD_CHROOT}" ] ; then
69
		LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so"
69
		LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so"
70
		export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so"
70
		export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so"
71
                mount --bind /proc "${DHCPD_CHROOT}/proc"
71
	fi
72
	fi
72
73
73
	local pidfile="$(get_var pid-file-name)"
74
	local pidfile="$(get_var pid-file-name)"
Lines 90-94 Link Here
90
	ebegin "Stopping ${chroot:+chrooted }${SVCNAME}"
91
	ebegin "Stopping ${chroot:+chrooted }${SVCNAME}"
91
	start-stop-daemon --stop --exec /usr/sbin/dhcpd \
92
	start-stop-daemon --stop --exec /usr/sbin/dhcpd \
92
		--pidfile "${chroot}/$(get_options pidfile)"
93
		--pidfile "${chroot}/$(get_options pidfile)"
93
	eend $?
94
        res=$?
95
96
	if [ -n "${DHCPD_CHROOT}" ] ; then
97
                umount "${DHCPD_CHROOT}/proc"
98
	fi
99
	eend $res
94
}
100
}

Return to bug 362535