ports/69590: Fix isc-dhcp3-server startup scripts on -current

Craig Rodrigues rodrigc at crodrigues.org
Sun Jul 25 17:30:30 UTC 2004


>Number:         69590
>Category:       ports
>Synopsis:       Fix isc-dhcp3-server startup scripts on -current
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 25 17:30:24 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Craig Rodrigues
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD dibbler.crodrigues.org 5.2-CURRENT FreeBSD 5.2-CURRENT #22: Sat Jul 24 15:48:06 EDT 2004 rodrigc at dibbler.crodrigues.org:/usr/obj/usr/src/sys/MYKERNEL1 i386


	
>Description:
	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
>How-To-Repeat:
	
>Fix:


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 -r1.7 isc-dhcpd.sh.sample
--- isc-dhcpd.sh.sample	6 Jul 2004 00:57:13 -0000	1.7
+++ isc-dhcpd.sh.sample	25 Jul 2004 17:15:06 -0000
@@ -17,24 +17,24 @@
 paranoia=%%PARANOIA%%				# compiled in paranoia?
 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_chuser_enable=YES			# runs w/o privileges?
-dhcpd_withuser=${name}			# user name to run as
-dhcpd_withgroup=${name}			# group name to run as
+# set these variables if they are not defined in /etc/rc.conf
+[ -z "$dhcpd_enable" ] && dhcpd_enable="NO"
+[ -z "$dhcpd_flags" ] && dhcpd_flags= # -q -early_chroot	# command option(s)
+[ -z "$dhcpd_conf" ] && dhcpd_conf=%%PREFIX%%/etc/${name}.conf	# configuration file
+[ -z "$dhcpd_ifaces" ] && dhcpd_ifaces=		# ethernet interface(s)
+[ -z "$dhcpd_withumask" ] && dhcpd_withumask=022	# file creation mask
+
+[ -z "$dhcpd_chuser_enable" ] && dhcpd_chuser_enable=YES			# runs w/o privileges?
+[ -z "$dhcpd_withuser" ] && dhcpd_withuser=${name}	# user name to run as
+[ -z "$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
+[ -z "$dhcpd_chroot_enable" ] && dhcpd_chroot_enable=NO	# runs chrooted?
+[ -z "$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
+[ -z "$dhcpd_jail_enable" ] && dhcpd_jail_enable=NO	# runs imprisoned?
+[ -z "$dhcpd_hostname" ] && dhcpd_hostname=		# jail hostname
+[ -z "$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 -r1.2 isc-dhcrelay.sh.sample
--- isc-dhcrelay.sh.sample	16 Mar 2004 20:31:15 -0000	1.2
+++ isc-dhcrelay.sh.sample	25 Jul 2004 17:15:06 -0000
@@ -11,11 +11,11 @@
 # dhcrelay_enable="YES"
 #
 
-# 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)
+# set these variables if they have not been defined in /etc/rc.conf
+[ -z "$dhcrelay_enable" ] && dhcrelay_enable="NO"
+[ -z "$dhcrelay_flags" ] && dhcrelay_flags=		# command option(s)
+[ -z "$dhcrelay_servers" ] && dhcrelay_servers=	# dhcrelay server(s)
+[ -z "$dhcrelay_ifaces" ] && dhcrelay_ifaces=		# ethernet interface(s)
 
 dhcrelay_precmd ()
 {

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list