FS#60310 - [dhcpcd] Hooks dir should be changed
Attached to Project:
Arch Linux
Opened by Kim Scarborough (chowbok) - Thursday, 04 October 2018, 23:27 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:23 GMT
Opened by Kim Scarborough (chowbok) - Thursday, 04 October 2018, 23:27 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:23 GMT
|
Details
Currently, dhcpcd hook scripts need to be added to
/usr/lib/dhcpcd/dhcpcd-hooks/, and also edited there if
changes are needed. This doesn't seem to be in keeping with
standard Arch practice. Can HOOKDIR be changed in
Makefile.inc to /etc/dhcpcd-hooks? (Note that you can't just
change the libexec location configure argument, as this also
controls the location of the dhcpcd-run-hooks.)
|
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:23 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/dhcpcd/issues/1
Saturday, 25 November 2023, 20:23 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/dhcpcd/issues/1
/etc/dhcpcd.enter-hook
/usr/lib/dhcpcd/dhcpcd-hooks/*
/etc/dhcpcd.exit-hook
So if you want to run an extra hook, say the wpa_supplicant hook, you have to copy or symlink it to /usr/lib/dhcpcd/dhcpcd-hooks/. It seems to me that we should avoid having to edit things in /usr/lib, and it's pretty easy to redefine the one variable so that the hooks directory is in /etc/dhcpcd-hooks instead.
# Run the wpa_supplicant hook
. /usr/lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant
But really, I only wrote the wpa_supplicant hook because wpa_supplicant didn't have a means of hotplugging interfaces - so I fixed wpa_supplicant.
Starting with wpa_supplicant-2.6 it can be compiled with CONFIG_MATCH_IFACE (no idea if this is enabled in Arch). It can then be started like so:
wpa_supplicant -B -M -c/etc/wpa_supplicant.conf
And voila, wpa_supplicant hot plugs all wireless interfaces from one config file, giving you the same functionality as the dhcpcd hook.