Bug 133072 - [patch] net/isc-dhcp30-server, net/isc-dhcp30-server: check configuration file before restart
Summary: [patch] net/isc-dhcp30-server, net/isc-dhcp30-server: check configuration fil...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Josh Paetzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-25 20:00 UTC by Eygene Ryabinkin
Modified: 2009-06-27 18:40 UTC (History)
0 users

See Also:


Attachments
implement-configuration-file-check.diff (2.81 KB, patch)
2009-03-25 20:00 UTC, Eygene Ryabinkin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eygene Ryabinkin 2009-03-25 20:00:02 UTC
Had just been beaten by the following (silly) error: I had made a
mistake in the DHCP configuration file, restarted daemon and started to
scratch my head in order to understarnd why clients aren't getting their
IPs and other stuff.  I understarnd that it is my fault, but if rc.d
script will be able to test configuration and refuse to start with the
broken config file -- it will be great.

Moreover, there is no point in doing restart with the broken
configuration file -- it is better to leave the running instance.

Fix: The following patch adds the check both to the rc.d script for DHCPD 3.0
and 3.1.  I had tested it for 3.0, but it should also work for 3.1.
How-To-Repeat: 
Make a mistake in the configuration file and do
'/usr/local/etc/rc.d/isc-dhcpd restart'.  You'll see the following
output:
-----
Stopping dhcpd.
Starting dhcpd.
-----
Sounds like everything is good, but in reality dhcpd daemon will not
be running.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-03-25 20:00:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2009-03-25 20:00:26 UTC
Maintainer of net/isc-dhcp30-server,

Please note that PR ports/133072 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/133072

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2009-03-25 20:00:31 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Eygene Ryabinkin 2009-04-24 04:56:05 UTC
Joerg, good day.

Could you, please, say something about this PR: is it absolutely mad
thing to do?  Or it is useful, but should be changed in some ways (tell
me, I'll try to make the needed modifications)?  Or you just have no
time now and I should wait a bit?

Thanks!
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook
    {_.-``-'         {_/            #
Comment 5 Eygene Ryabinkin 2009-05-05 18:30:11 UTC
Gentlemen, can I remind you about this PR?  If it is unacceptable,
just say why ;))

Thanks!
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook
    {_.-``-'         {_/            #
Comment 6 Wesley Shields freebsd_committer freebsd_triage 2009-05-11 00:35:17 UTC
Responsible Changed
From-To: miwi->wxs

I'll take it.
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2009-05-12 23:45:47 UTC
Responsible Changed
From-To: wxs->jpaetzel

Over to new maintainer, who (since he is a committer) gets the reassignment 
from wxs.
Comment 8 dfilter service freebsd_committer freebsd_triage 2009-06-27 18:35:17 UTC
jpaetzel    2009-06-27 17:35:08 UTC

  FreeBSD ports repository

  Modified files:
    net/isc-dhcp30-server/files patch-server::dhcpd.c isc-dhcpd.in 
    net/isc-dhcp30-server Makefile 
  Log:
  - Replace jail patch with one by jhb@
  - Add a checkconfig target to rcNG script
  
  PR:     ports/133072
  Submitted by:   rea-fbsd@codelabs.ru
  Approved by:    itetcu@ (mentor)
  
  Revision  Changes    Path
  1.134     +1 -1      ports/net/isc-dhcp30-server/Makefile
  1.7       +21 -1     ports/net/isc-dhcp30-server/files/isc-dhcpd.in
  1.5       +29 -36    ports/net/isc-dhcp30-server/files/patch-server::dhcpd.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Josh Paetzel freebsd_committer freebsd_triage 2009-06-27 18:35:46 UTC
State Changed
From-To: feedback->closed

Committed, thanks!