2.5 KiB
dhcpcd
The uplink seat's module for a machine whose own network is dhcpcd's (novox/hq ADR 0117). It asks two things of dhcpcd, and nothing else: leave the resolver file to the mesh, and leave the private network's interface alone. It never declares an interface, an address, a route, a wireless network or its credentials — the link dhcpcd keeps is the only channel the mesh reaches the machine over.
What it writes
Two lines into /etc/dhcpcd.conf, as the mesh's marked region (into: block) — dhcpcd reads no
drop-in directory, so the mesh writes into its one file rather than over it (ADR 0102):
nohook resolv.conf— dhcpcd's resolv.conf hook rewrites/etc/resolv.confon every lease it takes or renews, which would silently replace the resolverresolv-confnames.denyinterfaces mesh0— dhcpcd never asks for a lease on the private network's interface, and never takes it down. dhcpcd leaves a point-to-point interface alone by default; this says so rather than relying on it.
At the start of the file (at: start). Both are global options, and dhcpcd reads every line
after an interface or ssid line as that interface's own. A configured machine's file ends in
exactly such a block (the interface, its static address), so appended at the end these two would
quietly apply to one interface only.
Why it declares no service
dhcpcd is the machine's, not the mesh's. The mesh never starts, stops or enables it: stopping it
drops the address the machine is reached at, and a module unassigned by mistake must not be able
to do that. And there is nothing to reload it with — dhcpcd.service reports CanReload=no, and
a restart drops the lease. So the two lines take effect at dhcpcd's next start.
On an adopted machine that is normally no gap: the predecessor wrote the same nohook line, and
it is already in force. On a machine that was not adopted, it is one: until dhcpcd next
starts (a reboot, or the operator restarting it in a window of their choosing), a lease renewal
still rewrites /etc/resolv.conf, and resolv-conf puts it back at the next push. Assign this
module before resolv-conf on such a machine, and restart dhcpcd once, by hand, when losing the
link for a moment is acceptable.
One manager per machine
It claims the-uplink: a machine runs one network manager, and assigning a second module that
claims the seat is refused. Assigning this one to a machine whose network is NetworkManager's
installs the package and writes the two lines, and starts nothing.