[arch-releng] [RFC] Rework pxe hooks
thomas at archlinux.org
Sun Aug 26 10:34:17 EDT 2012
Am 25.08.2012 18:09, schrieb Gerardo Exequiel Pozzi:
>> The DHCP server passes two strings as DHCP options. The options 224 and
>> 225 as given above are "for private use". Option 224 contains either
>> "http", "NFS" or "NBD". Option 225 contains the actual URL.
>> The advantage of this setup is that we can just extract the ISO and
>> configure everything via the DHCP server configuration file. There is no
>> need to change the archiso bootloader configuration, and we only get a
>> single option in the boot menu, instead of three.
>> I can implement this, but I thought I'd put this up for comments first,
>> as I didn't get a chance to do it yet.
> I like it, will look good :)
> When this is done, or maybe during the transition we can migrate from
> nfsmount and start using commands from nfs-utils, in order to get rid
> off klibc stuff at all.
Okay, I just tried, and I am dropping this for now, maybe I'll get
motivated again soon.
1) dhcpcd is the crappiest piece of a dhcp client that exists. You
cannot make it request any custom options. And if you force the dhcp
server to send custom options, dhcpcd does not parse them.
The only options that dhcpcd will recognize are the standard options
that are hardcoded. Everything else will be considered an "unknown
option". I cannot find the words to express how stupid this behaviour
is. Configurability = non-existent.
2) dhclient can deal with custom options.
However, instead of custom hooks, it has one script (dhclient-script) to
deal with the setup - I cannot just write a short "hook" to deal with my
custom options only.
And it gets worse: The upstream dhclient-script is based on a 13 year
old script and uses ifconfig and route for everything (except ipv6,
where it uses ip). Despite relying on /bin/bash and using some bash
extensions, most test constructs use the stupid [ "x$foo" = "x" ] syntax
to check variables, making the script hardly readable.
Fedora has an updated dhclient-script that seems to be written properly,
but it uses tools that we don't seem to have on our system. (Another
example of how Fedora submit their improvements upstream.)
Fixing dhcp clients and their management scripts is not what I had
planned to do on a Sunday and I am stopping now before I start throwing
computer parts around.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 897 bytes
Desc: OpenPGP digital signature
More information about the arch-releng