Bug 69590

Summary: Fix isc-dhcp3-server startup scripts on -current
Product: Ports & Packages Reporter: Craig Rodrigues <rodrigc>
Component: Individual Port(s)Assignee: Pav Lucistnik <pav>
Status: Closed FIXED    
Severity: Affects Only Me CC: cyrille.lefevre
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Craig Rodrigues 2004-07-25 18:30:24 UTC
	Due to recent changes in the rc.d scripts on FreeBSD-current,
	isc-dhcp3-server startup scripts are unconditionally overriding
	settings in /etc/rc.conf.  See description by mtm@ for
	ways to fix these scripts:
	http://lists.freebsd.org/pipermail/freebsd-current/2004-July/032426.html
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-25 19:51:10 UTC
Dear maintainer of FreeBSD port isc-dhcp3-server, please take a look at

http://www.freebsd.org/cgi/query-pr.cgi?q=69590

Do you approve or reject this patch?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

Adding horrible bugs to the source is a venal sin.
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-25 19:51:15 UTC
State Changed
From-To: open->feedback

Asked maintainer for review and approval. 


Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-25 19:51:15 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Handle.
Comment 4 Cyrille Lefevre 2004-07-25 22:41:49 UTC
"Pav Lucistnik" <pav@FreeBSD.org> wrote:
> Dear maintainer of FreeBSD port isc-dhcp3-server, please take a look at
> 
> http://www.freebsd.org/cgi/query-pr.cgi?q=69590
> 
> Do you approve or reject this patch?


I will go in holidays tomorrow, so, I don't have the time to take a look at
this patch. however, the solution I propose is :

    ln -s /etc/dhcpd.conf /usr/local/etc/dhcpd.conf

I will take a look at this when I will return in around two weeks, thanks.

Cyrille Lefevre.
-- 
home: mailto:cyrille.lefevre@laposte.net
Comment 5 Craig Rodrigues 2004-07-26 15:58:59 UTC
Hi,

I would like to withdraw my patch for this PR.
I prefer the patch that Mike Makonnen submitted to portmgr here:

 http://people.freebsd.org/~mtm/portrcd

Thanks.

P.S.  The port maintainer's suggestion of symlinking /etc/dhcpd.conf to
/usr/local/etc/dhcpd.conf does not solve the problem.

-- 
Craig Rodrigues        
http://crodrigues.org
rodrigc@crodrigues.org
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-26 16:04:56 UTC
State Changed
From-To: feedback->closed

Closed on submitter's request.
Comment 7 Cyrille Lefevre 2004-07-26 21:49:50 UTC
On Jul 25, 2004 08:51:10 pm +0200, Pav Lucistnik wrote:
> Dear maintainer of FreeBSD port isc-dhcp3-server, please take a look at
> 
> http://www.freebsd.org/cgi/query-pr.cgi?q=69590
> 
> Do you approve or reject this patch?

I prefer this one, thanks :)

Index: isc-dhcpd.sh.sample
===================================================================
RCS file: /home/ncvs/ports/net/isc-dhcp3-server/files/isc-dhcpd.sh.sample,v
retrieving revision 1.7
diff -u -I$Id.*$ -I$.+BSD.*$ -r1.7 isc-dhcpd.sh.sample
--- isc-dhcpd.sh.sample	6 Jul 2004 00:57:13 -0000	1.7
+++ isc-dhcpd.sh.sample	26 Jul 2004 20:47:32 -0000
@@ -18,23 +18,23 @@
 jail=%%JAIL%%				# compiled in jail?
 
 # override these variables in /etc/rc.conf
-dhcpd_enable=NO
-dhcpd_flags= # -q -early_chroot		# command option(s)
-dhcpd_conf=%%PREFIX%%/etc/${name}.conf	# configuration file
-dhcpd_ifaces=				# ethernet interface(s)
-dhcpd_withumask=022			# file creation mask
+dhcpd_enable=${dhcpd_enable:-"NO"}
+dhcpd_flags=${dhcpd_flags:-} # -q -early_chroot		# command option(s)
+dhcpd_conf=${dhcpd_conf:-%%PREFIX%%/etc/${name}.conf}	# configuration file
+dhcpd_ifaces=${dhcpd_ifaces:-}				# ethernet interface(s)
+dhcpd_withumask=${dhcpd_withumask:-022}			# file creation mask
 
-dhcpd_chuser_enable=YES			# runs w/o privileges?
-dhcpd_withuser=${name}			# user name to run as
-dhcpd_withgroup=${name}			# group name to run as
+dhcpd_chuser_enable=${dhcpd_chuser_enable:-"YES"}	# runs w/o privileges?
+dhcpd_withuser=${dhcpd_withuser:-${name}}		# user name to run as
+dhcpd_withgroup=${dhcpd_withgroup:-${name}}		# group name to run as
 
-dhcpd_chroot_enable=NO			# runs chrooted?
-dhcpd_rootdir=/var/db/${name}		# directory to run in
+dhcpd_chroot_enable=${dhcpd_chroot_enable:-"NO"}	# runs chrooted?
+dhcpd_rootdir=${dhcpd_rootdir:-/var/db/${name}}		# directory to run in
 
 # untested
-dhcpd_jail_enable=NO			# runs imprisoned?
-dhcpd_hostname=				# jail hostname
-dhcpd_ipaddress=			# jail ip address
+dhcpd_jail_enable=${dhcpd_jail_enable:-"NO"}		# runs imprisoned?
+dhcpd_hostname=${dhcpd_hostname:-}			# jail hostname
+dhcpd_ipaddress=${dhcpd_ipaddress:-}			# jail ip address
 
 safe_run ()	# rc command [args...]
 {
Index: isc-dhcrelay.sh.sample
===================================================================
RCS file: /home/ncvs/ports/net/isc-dhcp3-server/files/isc-dhcrelay.sh.sample,v
retrieving revision 1.2
diff -u -I$Id.*$ -I$.+BSD.*$ -r1.2 isc-dhcrelay.sh.sample
--- isc-dhcrelay.sh.sample	16 Mar 2004 20:31:15 -0000	1.2
+++ isc-dhcrelay.sh.sample	26 Jul 2004 20:47:32 -0000
@@ -12,10 +12,10 @@
 #
 
 # override these variables in /etc/rc.conf
-dhcrelay_enable=NO
-dhcrelay_flags=				# command option(s)
-dhcrelay_servers=			# dhcrelay server(s)
-dhcrelay_ifaces=			# ethernet interface(s)
+dhcrelay_enable=${dhcrelay_enable:-"NO"}
+dhcrelay_flags=${dhcrelay_flags:-}			# command option(s)
+dhcrelay_servers=${dhcrelay_servers:-}			# dhcrelay server(s)
+dhcrelay_ifaces=${dhcrelay_ifaces:-}			# ethernet interface(s)
 
 dhcrelay_precmd ()
 {

Cyrille Lefevre
-- 
mailto:cyrille.lefevre@laposte.net