tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: DHCP client with minimal functionality and size



On Friday 11 April 2008 20:04:20 Thor Lancelot Simon wrote:
> > However, I do think it's fair that if you request an option that dhcpcd
> > knows about, such as NTP servers, then it will configure them for you.
>
> ...and we arrive at the reason why ISC dhclient has scripts for
> manipulating the system.  Some users are naive about their system and
> network
> configurations and just want the DHCP client to "do magic" -- they don't
> know about existing configuration files and don't care what it does to
> them.
>
> Other users, on the other hand, have quite a bit of local configuration
> state and under no circumstances want a network client program blindly
> overwriting it -- but parsing the configuration file for daemon _X_ in a
> small C program like a dhcp client should be is not practical.

So in other words, we need options to have 3 states

1) don't request it
2) request it, but don't do anything aside from pass it to the script
3) request it and do something with it

2 is only different from 3 if dhcpcd knows what to *do* with it.
Currently, dhcpcd knows to handle these
ip address/netmask/broadcast, static routes, routers, csrs, domain, domain 
search, dns servers
These are all kind of required for basic dhcp operation, and will remain in 
the dhcpcd binary itself.

dhcpcd also knows about hostname, mtu, nis and ntp (and openntp) and will 
attempt to configure them for you. In the instances where it writes to a 
config file (ntp, nis, dns), dhcpcd makes no attempt at parsing and blindly 
overwrites. There is an argument this could be moved to a shell file.

The dhcpcd default has always been if we know how to configure it then do so 
unless otherwise instructed. dhcpcd also has lots of users in the Linux world 
who rely on this long standing behaviour.

So, if dhcpcd installs a default script to modify ntp and nis would that 
satisfy the requirements? Distributions, such as Gentoo, Debian and SUSE 
could then install the script by default whereas the more minimalistic ones 
such as NetBSD could install the script in an example area.

Thanks

Roy


Home | Main Index | Thread Index | Old Index