On Wed, 26 Mar 2025 12:40:45 +0100 Chris Hofstaedtler <z...@debian.org> wrote: > * Martin-Éric Racine <martin-eric.rac...@iki.fi> [250326 11:09]: > >On Fri, 21 Mar 2025 21:30:50 +0100 Daniel =?utf-8?Q?Gr=C3=B6ber?= > ><d...@darkboxed.org> wrote: > >> On Fri, Mar 21, 2025 at 09:57:01PM +0200, Martin-Éric Racine wrote: > >> > This is yet another upstream issue. Debian is the wrong place to report > >> > this. > >> > >> Since we've switched to dhcpcd by default this very much is a Debian > >> issue. dhclient had this feature, people will be expecting it in it's > >> replacement. > >> > >> Just because this is a patch we should also clear with upstream before > >> applying I don't see why we shouldn't have a tracking issue for it in > >> Debian. Very much the opposite tracking issues are highly useful. > >> > >> If you don't want to work on it that's fine. dhcpcd is collab maintained > >> last I checked being in the debian/ namespace on salsa. Right? I'm planning > >> to work on a number of these issues to get it into shape for trixie and BTS > >> is my TODO list here. > > > >For what it's worth, here's how little the feature is used even for dhclient. > > > >In Bookworm: > >$ apt-file search dhclient-exit-hooks.d > >avahi-autoipd: /etc/dhcp/dhclient-exit-hooks.d/zzz_avahi-autoipd > >chrony: /etc/dhcp/dhclient-exit-hooks.d/chrony > [..] > > > >In Trixie: > >$ apt-file search dhclient-exit-hooks.d > >avahi-autoipd: /etc/dhcp/dhclient-exit-hooks.d/zzz_avahi-autoipd > >chrony: /etc/dhcp/dhclient-exit-hooks.d/chrony > [..] > > > >Basically, while the idea of offering a directory for administrator > >scripts is a noble one, the need is very small. Let's call it a > >wishlist item. > > If anyone in the future considers implementing this, please also > consider: > > 1) packaged software can decide to listen on netlink events instead > > 2) packaged software probably wants to avoid dropping new scripts as > conffiles into /etc; so it would make sense to provide an > extension point in /usr that the admin can override in /etc > > 3) for local administrators dropping something in /etc might still > make sense > > > Personally I have no opinion if this feature should ever be done. > > Chris
Looking into the source code for dhcpcd-run-hooks: for hook in \ @SYSCONFDIR@/dhcpcd.enter-hook \ @HOOKDIR@/* \ @SYSCONFDIR@/dhcpcd.exit-hook do Which using our current configure options translates to: for hook in \ /etc/dhcpcd.enter-hook \ /usr/lib/dhcpcd/dhcpcd-hooks/* \ /etc/dhcpcd.exit-hook do Basically, we already support user scripts. However, the above fragment suggests that these are currently admin-configured flat files, rather than directories whose content is sourced. If directories would be preferable, this should be discussed upstream at https://github.com/NetworkConfiguration/dhcpcd/issues/494 instead of here. Martin-Éric