Bug 29317

Summary: No way to start dhcpd from rc.conf (and rc.network)
Product: Base System Reporter: Olafur Gudmundsson <ogud>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
file.diff none

Description Olafur Gudmundsson 2001-07-30 04:50:02 UTC
	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.

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. 

How-To-Repeat: 	start dhcpd, configure a guest machine from dhcpd
	reboot, try to reconfigure the guest machine it hangs while waiting 
	for dhcpd.
Comment 1 brooks 2001-07-30 04:57:24 UTC
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
Comment 2 Brooks Davis freebsd_committer freebsd_triage 2001-07-30 05:01:16 UTC
State Changed
From-To: open->closed

rc.conf should not generally support services not included in the base. 
/usr/local/etc/rc.d can be used instead.
Comment 3 Peter Pentchev 2001-07-30 10:23:51 UTC
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.