Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 182333 Details for
Bug 259364
[PATCH] net-misc/dhcp doesn't test config in init.d script
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for dhcpd.init file in portage
dhcpd.init.patch (text/plain), 1.29 KB, created by
Arturas
on 2009-02-17 15:05:30 UTC
(
hide
)
Description:
patch for dhcpd.init file in portage
Filename:
MIME Type:
Creator:
Arturas
Created:
2009-02-17 15:05:30 UTC
Size:
1.29 KB
patch
obsolete
>--- dhcpd.old 2009-02-17 16:38:42.000000000 +0200 >+++ dhcpd 2009-02-17 16:50:58.000000000 +0200 >@@ -3,6 +3,8 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.5 2007/04/02 12:34:01 uberlord Exp $ > >+opts="configtest" >+ > DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/dhcpd.conf} > > depend() { >@@ -15,6 +17,23 @@ > "${DHCPD_CHROOT}/${DHCPD_CONF}" > } > >+checkconfig() { >+ /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t 1>/dev/null 2>&1 >+ ret=$? >+ if [ $ret -ne 0 ]; then >+ eerror "${SVCNAME} has detected a syntax error in your configuration files:" >+ /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t >+ fi >+ >+ return $ret >+} >+ >+configtest() { >+ ebegin "Checking ${SVCNAME} configuration" >+ checkconfig >+ eend $? >+} >+ > start() { > # Work out our cffile if it's on our DHCPD_OPTS > case " ${DHCPD_OPTS} " in >@@ -32,6 +51,8 @@ > return 1 > fi > >+ checkconfig || return 1 >+ > local leasefile="$(get_var lease-file-name)" > leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}" > if [ ! -f "${leasefile}" ] ; then >@@ -63,6 +84,8 @@ > > stop() { > local chroot="$(get_options chroot)" >+ >+ checkconfig || return 1 > > ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" > start-stop-daemon --stop --exec /usr/sbin/dhcpd \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 259364
: 182333