From ogud@ogud.com  Sun Jul 29 20:47:00 2001
Return-Path: <ogud@ogud.com>
Received: from ogud.com (208-59-114-172.c3-0.129-ubr1.lnh-129.md.cable.rcn.com [208.59.114.172])
	by hub.freebsd.org (Postfix) with ESMTP id AB23137B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 29 Jul 2001 20:46:59 -0700 (PDT)
	(envelope-from ogud@ogud.com)
Received: (from ogud@localhost)
	by ogud.com (8.11.3/8.11.2) id f6U3kew58520;
	Sun, 29 Jul 2001 23:46:40 -0400 (EDT)
	(envelope-from ogud)
Message-Id: <200107300346.f6U3kew58520@ogud.com>
Date: Sun, 29 Jul 2001 23:46:40 -0400 (EDT)
From: Olafur Gudmundsson <ogud@ogud.com>
Reply-To: ogud@ogud.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: No way to start dhcpd from rc.conf (and rc.network)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         29317
>Category:       conf
>Synopsis:       No way to start dhcpd from rc.conf (and rc.network)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 29 20:50:02 PDT 2001
>Closed-Date:    Sun Jul 29 21:01:16 PDT 2001
>Last-Modified:  Mon Jul 30 02:30:01 PDT 2001
>Originator:     Olafur Gudmundsson
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD hlid.dc.ogud.com 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Thu Jul 5 12:58:49 EDT 2001 ogud@hlid.dc.ogud.com:/usr/src/sys/compile/Gatt.01 i386


	
>Description:
	Standard FreeBSD-4.3 does not install dhcpd program and 
	even after one is installed via ports or packages, 
	there is no prototype in rc.defaults to start one with or 
	block in rc.network to execute the startup. 

>How-To-Repeat:
	start dhcpd, configure a guest machine from dhcpd
	reboot, try to reconfigure the guest machine it hangs while waiting 
	for dhcpd.  

>Fix:
	Attached is are the patches to /etc/default/rc.default and 
	/etc/rc.network that allow me to have dhcpd start up on boot. 


--- etc/defaults/rc.conf	Sun Jun 17 00:20:40 2001
+++ /etc/defaults/rc.conf	Sun Jul 29 23:34:16 2001
@@ -153,6 +153,8 @@
 sshd_enable="NO"                # Enable sshd
 sshd_program="/usr/sbin/sshd"	# path to sshd, if you want a different one.
 sshd_flags=""                   # Additional flags for sshd.
+dhcpd_enable="NO"               # Set to YES to start dhcpd server
+dhcpd_flags=""                  # Additional flags for dhcpd
 
 ### Network Time Services options: ###
 timed_enable="NO"		# Run the time daemon (or NO).


--- etc/rc.network	Tue Mar  6 10:28:51 2001
+++ /etc/rc.network	Sun Jul 29 23:34:10 2001
@@ -720,6 +720,12 @@
 		;;
 	esac
 
+	case ${dhcpd_enable} in
+	[Yy][Ee][Ss])
+		echo -n ' dhcpd';	dhcpd ${dhcpd_flags}
+		;;
+	esac
+
 	echo '.'
 	network_pass3_done=YES
 }
>Release-Note:
>Audit-Trail:

From: Brooks Davis <brooks@one-eyed-alien.net>
To: Olafur Gudmundsson <ogud@ogud.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/29317: No way to start dhcpd from rc.conf (and rc.network)
Date: Sun, 29 Jul 2001 20:57:24 -0700

 On Sun, Jul 29, 2001 at 11:46:40PM -0400, Olafur Gudmundsson wrote:
 > >Description:
 > 	Standard FreeBSD-4.3 does not install dhcpd program and 
 > 	even after one is installed via ports or packages, 
 > 	there is no prototype in rc.defaults to start one with or 
 > 	block in rc.network to execute the startup. 
 
 FreeBSD can no and will not provide direct support for every random daemon
 someone choosed to write via /etc/rc.network.  That would be insane.
 Since FreeBSD does not ship with a dhcpd, it will not support it via
 /etc/rc.conf at this time.  However, you can start dhcpd by placing a
 script like the following in /usr/local/etc/rc.d, named dhcpd.sh or
 similar:
 
 #!/bin/sh
 [ -x /usr/local/sbin/dhcpd ] && /usr/local/sbin/dhcpd fxp1 -q && echo -n ' dhcpd'
 
 -- Brooks
State-Changed-From-To: open->closed 
State-Changed-By: brooks 
State-Changed-When: Sun Jul 29 21:01:16 PDT 2001 
State-Changed-Why:  
rc.conf should not generally support services not included in the base. 
/usr/local/etc/rc.d can be used instead. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29317 

From: Peter Pentchev <roam@orbitel.bg>
To: freebsd-gnats-submit@FreeBSD.org
Cc: Brooks Davis <brooks@one-eyed-alien.net>
Subject: Re: conf/29317: No way to start dhcpd from rc.conf (and rc.network)
Date: Mon, 30 Jul 2001 12:23:51 +0300

 On Sun, Jul 29, 2001 at 09:00:02PM -0700, Brooks Davis wrote:
 > The following reply was made to PR conf/29317; it has been noted by GNATS.
 > 
 > From: Brooks Davis <brooks@one-eyed-alien.net>
 > To: Olafur Gudmundsson <ogud@ogud.com>
 > Cc: FreeBSD-gnats-submit@FreeBSD.ORG
 > Subject: Re: conf/29317: No way to start dhcpd from rc.conf (and rc.network)
 > Date: Sun, 29 Jul 2001 20:57:24 -0700
 > 
 >  On Sun, Jul 29, 2001 at 11:46:40PM -0400, Olafur Gudmundsson wrote:
 >  > >Description:
 >  > 	Standard FreeBSD-4.3 does not install dhcpd program and 
 >  > 	even after one is installed via ports or packages, 
 >  > 	there is no prototype in rc.defaults to start one with or 
 >  > 	block in rc.network to execute the startup. 
 >  
 >  FreeBSD can no and will not provide direct support for every random daemon
 >  someone choosed to write via /etc/rc.network.  That would be insane.
 >  Since FreeBSD does not ship with a dhcpd, it will not support it via
 >  /etc/rc.conf at this time.  However, you can start dhcpd by placing a
 >  script like the following in /usr/local/etc/rc.d, named dhcpd.sh or
 >  similar:
 >  
 >  #!/bin/sh
 >  [ -x /usr/local/sbin/dhcpd ] && /usr/local/sbin/dhcpd fxp1 -q && echo -n ' dhcpd'
 
 Actually, a much more elaborate startup/shutdown script is already
 provided with both the DHCP ports - net/isc-dhcp and net/isc-dhcp3.
 All it takes to start is, it needs to find a /usr/local/etc/dhcpd.conf
 file, which can be easily derived from /usr/local/etc/dhcpd.conf.sample.
 
 G'luck,
 Peter
 
 -- 
 because I didn't think of a good beginning of it.
>Unformatted:
