systemd: how to selectively disable wpa_supplicant for a specific WLAN interface?
Use the "nohook wpa_supplicant" option in /etc/dhcpcd.conf. If you don't want wpa_supplicant for wlan0 this would be:
interface wlan0
nohook wpa_supplicant
I had the same problem. @Nproject found a nice solution. But you don't have to modify each of this procedures. Simply go to the end of the file Nproject mentioned (/lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant
) and modify the following if clause:
ORIGINAL
if [ "$ifwireless" = "1" ] && \
type wpa_supplicant >/dev/null 2>&1 && \
type wpa_cli >/dev/null 2>&1
then
case "$reason" in
PREINIT) wpa_supplicant_start;;
RECONFIGURE) wpa_supplicant_reconfigure;;
DEPARTED) wpa_supplicant_stop;;
esac
fi
Add [ "$interface" != "TheInterfaceWPASupplicantShouldBeDisabledOn" ]
in this way:
MODIFIED
if [ "$ifwireless" = "1" ] && [ "$interface" != "TheInterfaceWPASupplicantShouldBeDisabledOn" ] && \
type wpa_supplicant >/dev/null 2>&1 && \
type wpa_cli >/dev/null 2>&1
then
case "$reason" in
PREINIT) wpa_supplicant_start;;
RECONFIGURE) wpa_supplicant_reconfigure;;
DEPARTED) wpa_supplicant_stop;;
esac
fi
Additionally this will prevent the Network Manager (GUI) in your taskbar to show up this interface.