OS is Debian 10-12. I know in some (most?) cases, a DHCP server will provide DNS servers at the same time as it leases an ip address.
I would like to use dhclient to get a list of DNS servers provided by the DHCP server.
(I realize I can look in /var/lib/dhcp for a lease file, but I want to do an active query in order to check the current state of the DHCP server.)
/sbin/dhclient-script) to make the necessary changes on your system. You can write your own script to replace the defaultdhclient-scriptand do whatever you want with that information (dhclient -sf /path/to/my/script).