[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to make dhclient reread its config? (Debian 10)



Greg Wooledge wrote:
> On Wed, Aug 26, 2020 at 10:56:30AM +0700, Victor Sudakov wrote:
> > I've made some changes to /etc/dhcp/dhclient.conf, now I need to make
> > dhclient reread it (and apply the changes to /etc/resolv.conf).
> 
> There is nothing you can put in dhclient.conf that will successfully
> prevent dhclient from fucking up your resolv.conf file in the general
> case.  

Well, I don't quite agree with you. The append, prepend and supersede
options can be quite useful.

> (You might be lucky enough that it works on *one* network, but
> even then, why take the chance?)
> 
> Please see <https://wiki.debian.org/resolv.conf> for your options.

Yes, my case is mentioned there in the "Modifying /etc/dhcp/dhclient.conf" paragraph.
Sadly, this article does not mention how to restart dhclient gracefully.

> 
> As far as "re-reading" goes, what you want to do is bring the interface
> down and back up.
> 
> ifdown yourifname
> ifup yourifname

I've found out that running `systemctl restart networking` is sufficient,
simple and safe. I've modified 3 remove hosts already without issues.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

Attachment: signature.asc
Description: PGP signature


Reply to: