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

Re: Strange syslog behaviour [Solved]



On Sun, 16 Oct 2022 09:09:36 -0400
Wayne Sallee <Wayne@WayneSallee.com> wrote:

> > You rejected the new file, which is why it was instead written to
> > /etc/logrotate.d/rsyslog.dpkg-dist (which you could have safely
> > left or removed—it's harmless).  
> 
> Yes, I rejected the new file, causing the other file to be there. It
> would be nice if updates told what needed to be updated in the old
> file when updates are done.

You can get that by accepting or rejecting the new file, then diffing
the resulting file with the one dpkg writes.

> > Effectively, your edit has merged the contents of both files,
> > whatever changes you made earlier before the Buster upgrade,
> > and the vital change that would have been made for you if
> > you'd accepted the new version.  
> 
> But If I had accepted the new file, it would probably have discarded
> the changes that I had made.

It would have. But it preserves the old file, and you can then copy
from the old file to the new as appropriate. Again, diff is your
friend. I use Emacs' ediff mode to do this.


> 
> It would be nice if updates presented "old file", "new file",
> "combined file"; choice: (1), (2), (3).

There is no way the updates could figure out what the appropriate
combined file would be. It would have no idea what your changes to the
old file do, or which changes are appropriate to the new situation. You
have to make that decision.

When I do an upgrade I run the upgrade in one terminal, and have Emacs
running in another. As these differences pop up, I accept one of the
options, then edit away as necessary. It takes a while to do an upgrade,
but I usually get what I want and don't have to go back and make more
edits.

And I also make sure I have recent backups of /etc and a few other
places so I can restore my original files if need be.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: