> When the NIC is enabled on boot, this is what I see. > > -bash-3.2# cat /etc/nsswitch.conf | egrep "^hosts|^ipnodes" > hosts: files dns # Added by DHCP > ipnodes: files dns # Added by DHCP > > The entries, per the comment, were added by "DHCP" (during boot). Why > doesn't it do the same, when I start dhcp for an interface?
The architecture of the DHCP client is such that the daemon configures only the bare minimum to get network connectivity, and leaves all other policy decisions about how to use the configuration up to other subsystems, which can query the information using dhcpinfo. The boot scripts query that information and apply it, but after boot this isn't done, hence the behavior you observe. If you'd like to customize this, check out the DHCP client eventhook mechanism described in dhcpagent(1M). In the past, we've discussed providing a system-level eventhook that basically does everything that's done at boot and then removing the boot code, but NWAM provides a much broader and flexible way to make this seamless. That said, there could still be a case made for it on systems that want to use DHCP but for which NWAM is not appropriate. -- meem _______________________________________________ networking-discuss mailing list [email protected]
