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

Re: Replace line in file based on pattern



On 1/2/22 11:03 PM, Greg Wooledge wrote:
On Sun, Jan 02, 2022 at 09:59:08PM -0500, Paul M. Foster wrote:
Regarding "patch", let's consider a "stock" config file from a fresh install
(call it NEW), and an existing config which is tweaked for my purposes (call
it OLD). Assume I want the stock config altered to conform to my
existing/working installation.

If you're reinstalling after a disk or system failure, you should be
able to drop the config files from your backup onto the system, either
before or after you install the software packages that use those files.

This is a fair point. In the case of a hardware failure, simply reinstalling working configs over the top of "stock" ones would work fine.


The scenario you seem to be imagining involves reinstalling software
packages and somehow ending up with a *different* version of the software
than you had been running on the failed system.  This isn't going
to happen if you were running Debian stable, and you reinstall Debian
stable.

The only way it would be a concern is if you're *not* running Debian
stable, or if you reinstall with something other than Debian stable.
In those cases, well, you're kinda on your own.

I am running stable. Where this situation arises is when I've been running for a couple of years and Debian changes to a new version (10 to 11, for example). By that time, I have a lot of cruft on the machine, and I've just found it best to reinstall. And I've had it happen where a package changes its config, and I have to manually figure out what they've done, and how to compensate for it, to get back to a "working" (for me) state.

There are a lot of folks who like to "fiddle" with their systems constantly. I don't. So I'm not keen on having to manually fiddle with a lot of configs after an O/S version change.

Paul


Reply to: