On Sat, Jul 06, 2019 at 01:57:49PM BST, Jay Hart wrote: > > On Sat, Jul 06, 2019 at 11:56:32AM BST, Jay Hart wrote: > >> Good Morning, > >> > >> What is the simple way to have sysmerge "keep" all custom changes to the > >> config files, during a > >> system update from one stable release to the next? I seem to struggle with > >> this every release... > >> > >> Thanks for your time. > >> > >> Jay > >> > > > > Hi Jay, > > > > $ man 8 sysmerge > > [...] > > FILES > > /etc/sysmerge.ignore Files and directories to ignore from > > comparison. > > [...] > > > > Is this what you have in mind? > > > > Regards, > > > > Raf > > > > > > I think its more like when diff asks to keep current config vs new config. I > want to keep my > current config files (or at least those custom portions). > > Jay >
Jay, Well, if you want to keep the current config, then surely sysmerge asking you whether you want to or not, is unnecessary, isn't it? ;^) I use -current and this is what I do: 1. I modify the files (either by hand or using config management system). 2. I have a /etc/sysmerge.ignore file managed by SaltStack: /etc/acme-client.conf /etc/mail/aliases /etc/mail/smtpd.conf /etc/mail/spamd.conf /etc/newsyslog.conf /etc/ntpd.conf /etc/pf.conf /etc/syslog.conf /etc/X11/xenodm/Xsetup_0 /var/cron/tabs/root 3. Let sysmerge deal with any other files upon booting into a new snapshot. 4. Every so often, usually when there's something new of interest on "Following -current"[0], or I read about it on tech@ or source-changes@, I delete the above file and simply run: # sysmerge -d and merge the new bits in (if they're not in conflict with my own modifications). 5. Config management recreates the file. The above 'sysmerge -d' line is actually part of my post-upgrade script (and is being run with the above file in place), i.e.: /usr/sbin/sysmerge -d /usr/sbin/pkg_add -Dsnap -u /usr/sbin/pkg_delete -a /usr/local/sbin/checkrestart /usr/local/sbin/sysclean The last two are available from ports. [0] https://www.openbsd.org/faq/current.html Hope this helps. Cheers, Raf