| Summary: | /etc/rc* does not contain any support for dhclient | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Remy Card <card> | ||||
| Component: | conf | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 3.2-RELEASE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Remy Card
1999-08-05 13:50:01 UTC
On Thu, 5 Aug 1999, Remy Card wrote:
> 3.2-RELEASE contains dhclient but the startup scripts (/etc/rc*) do
> not include any support for it. Thus, it is not possible to use DHCP to
> set the IP address without modifying these scripts.
Sure it is. /etc/rc.network looks for the file /etc/start_if.${ifn} for
each interface ${ifn} listed in rc.conf, and runs it if present. If you
want to use dhclient to lease an address on fxp0, for instance, make a
file /etc/start_if.fxp0 with the following lines in it:
#!/bin/sh
/sbin/dhclient fxp0
The patch looks okay, too, though. There's something appealing about being
able to simply stick ifconfig_fxp0="DHCP" in rc.conf, and not have to muck
with a start_if script. I'd suggest calling the new rc.conf variable
something like dhcpc_program, instead of just dhcp_program, to avoid
confusion with a possible future DHCP server program variable.
Cheers,
Mick
On Thu, 5 Aug 1999, Remy Card wrote: > 3.2-RELEASE contains dhclient but the startup scripts (/etc/rc*) do > not include any support for it. Thus, it is not possible to use DHCP to > set the IP address without modifying these scripts. > Apply the following patch that adds dhclient support in /etc/rc.network > and /etc/defaults/rc.conf. This patch includes the changes made in the > current version of /etc/rc*. While I agree that we need better support for dhcp in the rc* scripts, I do not believe that your patch is the correct approach. There are many things you can do with dhcp other than just ifconfig'ing an interface, so the support needs to be more thorough than that. For one approach on using the start_if* approach see http://home.san.rr.com/freebsd/dhcp.html. I'm working on a more complete approach for dhcp support, if you'd be willing to test what I come up with send me a private e-mail and we can work something out. Doug -- On account of being a democracy and run by the people, we are the only nation in the world that has to keep a government four years, no matter what it does. -- Will Rogers ---------- Forwarded message ---------- Date: 11 Aug 1999 14:41:38 -0400 From: Lowell Gilbert <lowell@world.std.com> To: Nick Hibma <nick.hibma@jrc.it> Subject: Re: conf/12984: No dhclient support in /etc/rc* Nick Hibma <nick.hibma@jrc.it> writes: > > with a start_if script. I'd suggest calling the new rc.conf variable > > something like dhcpc_program, instead of just dhcp_program, to avoid > > confusion with a possible future DHCP server program variable. > > Making rc.conf depend on the version or make of the program is a bad > idea. Specifying it at all is a bad thing as we have a dhcp client in > the base distribution, so that should be used. I'm not completely sure I understand the point of the first sentence, but I don't see why this is any different than lpd, sendmail, portmap, bind, and so on. Given that there *are* alternatives, making it possible to use them through the same mechanism as the system's "stock" program seems quite reasonable. - Lowell Please close this PR since a similar patch has been commited to both current and stable. /K -- Johan Karlsson mailto:k@numeri.campus.luth.se State Changed From-To: open->closed A similar patch has already been committed to both -current and -stable. |