On Tue, Mar 18, 2025 at 04:44:03PM -0300, altoid via Dng wrote:
>
> [code]
> --- snip ---
> # update /etc/resolv.conf based on received values # <---- wthf?
> make_resolv_conf() {
> local new_resolv_conf
> --- snip ---
> [/code]
When I use dhcp, I just have a (repeated) post-up command to clean up
/etc/resolv.conf. It seems to work and is simple.
eg.
iface eth0 inet dhcp
pre-up /sbin/shorewall restart
post-up /etc/init.d/chrony restart
post-up /usr/bin/chronyc online
# resolve.conf seems to get overwritten *after* post-up below!! So
# ineffectual...
post-up cp /etc/resolv.conf_someisp /etc/resolv.conf
# Repeating seems to fix? Maybe a sleep 1, but perhaps faster by repeat?
post-up cp /etc/resolv.conf_someisp /etc/resolv.conf
Those comments were from several years ago. I have not needed to change
anything since then.
ael