Lines 3-9
Link Here
|
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.5 2007/04/02 12:34:01 uberlord Exp $ |
4 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.5 2007/04/02 12:34:01 uberlord Exp $ |
5 |
|
5 |
|
6 |
DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/dhcpd.conf} |
6 |
DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/${SVCNAME}.conf} |
7 |
|
7 |
|
8 |
depend() { |
8 |
depend() { |
9 |
need net |
9 |
need net |
Lines 33-43
Link Here
|
33 |
fi |
33 |
fi |
34 |
|
34 |
|
35 |
local leasefile="$(get_var lease-file-name)" |
35 |
local leasefile="$(get_var lease-file-name)" |
36 |
leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}" |
36 |
leasefile="${leasefile:-/var/lib/dhcp/${SVCNAME}.leases}" |
37 |
if [ ! -f "${leasefile}" ] ; then |
37 |
if [ ! -f "${DHCPD_CHROOT}${leasefile}" ] ; then |
38 |
ebegin "Creating ${leasefile}" |
38 |
ebegin "Creating ${leasefile}" |
39 |
touch "${leasefile}" |
39 |
touch "${DHCPD_CHROOT}${leasefile}" |
40 |
chown dhcp:dhcp "${leasefile}" |
40 |
chown dhcp:dhcp "${DHCPD_CHROOT}${leasefile}" |
41 |
eend $? || return 1 |
41 |
eend $? || return 1 |
42 |
fi |
42 |
fi |
43 |
|
43 |
|
Lines 48-59
Link Here
|
48 |
fi |
48 |
fi |
49 |
|
49 |
|
50 |
local pidfile="$(get_var pid-file-name)" |
50 |
local pidfile="$(get_var pid-file-name)" |
51 |
pidfile="${pidfile:-/var/run/dhcp/dhcpd.pid}" |
51 |
pidfile="${pidfile:-/var/run/dhcp/${SVCNAME}.pid}" |
52 |
|
52 |
|
53 |
ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" |
53 |
ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" |
54 |
start-stop-daemon --start --exec /usr/sbin/dhcpd \ |
54 |
start-stop-daemon --start --exec /usr/sbin/dhcpd \ |
55 |
--pidfile "${DHCPD_CHROOT}/${pidfile}" \ |
55 |
--pidfile "${DHCPD_CHROOT}/${pidfile}" \ |
56 |
-- ${DHCPD_OPTS} -q -pf "${pidfile}" \ |
56 |
-- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \ |
57 |
-user dhcp -group dhcp \ |
57 |
-user dhcp -group dhcp \ |
58 |
${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE} |
58 |
${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE} |
59 |
eend $? \ |
59 |
eend $? \ |