On Fri, Nov 12, 2021 at 02:04:56AM +0000, beebeet...@posteo.de wrote: > > I am not sure about what problem you are trying to solve. Won't the > > lines added by resolvd be overwritten anyway the first time you use the > > backed up file? > > What I'm trying to solve is that static part of the configuration being > mixed up with configuration generated runtime in a single file, which > leads to a few inconveniences: > - resolv.conf will show up in the diff between backups all the time > even if nothing has really changed;
You could backup /var/backups/etc_resolv.conf.current file instead of /etc/resolv.conf (or just all /var/backups files). The backup file seems to be changed only if the content is changed (I only checked mtime on the file on a moving laptop). So you will get the "stable" inode if content is the same. > - when migrating the configuration to a different deployment, for > example, one where IP address is statically assigned, resolvd will > not overwrite the "stale" auto-configured lines, and the old > nameserver info will linger unless manually removed. if the new host doesn't use resolvd(8) it could be a problem as the file will not be rewritten. But in this case you should take a different file for source for your template. OpenBSD isn't a static OS, it is expected to have to adapt the administration task for time to time. Please note that you could also run a simple command-line to "cleanup" resolv.conf: # sed -i -e '/ # resolvd: /d' /etc/resolv.conf (and if you put it in /etc/rc.local, your host with resolvd will recreate it at boot, and your host without resolvd will keep it clean). Thanks. -- Sebastien Marie