LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Which config file should I use... foo or foo.new? (https://www.linuxquestions.org/questions/slackware-14/which-config-file-should-i-use-foo-or-foo-new-573804/)

davidguygc 07-31-2007 07:48 PM

Which config file should I use... foo or foo.new?
 
Hi,

Ever since I upgraded from 11.0 to current, then to 12.0 there have been config files all over the place that have .new added to the end. (i.e. /etc/rc.d/rc.M and /etc/rc.d/rc.M.new)

I used kompare and there are differences here and there. Should I try and merge the two files together, or delete the one that doesn't have .new appended to it?

Thanks!
--David

gilead 07-31-2007 08:03 PM

If you've made customisations then you will probably merge them - checking the diffs should tell you which are your own changes. If you haven't customised them, then you should be able to over-write the original file with the .new file. As always, make sure you have a backup before you overwrite files (or copy the originals to .old, test and delete)...

archtoad6 08-01-2007 09:52 AM

I don't know if "all over the place" == "a lot". ;) But if you decide to take Steve's suggestion, the script that does it automatically might be very interesting.

gilead 08-01-2007 02:18 PM

I have to admit I'm too paranoid to try and automate it. The most work I've been able to remove from the process was to put as many of my customisations as possible to the /etc/rc.d/rc.* scripts in /etc/rc.d/rc.local and /etc/rc.d/rc.local_shutdown. That way I only have to worry about the daemon config files (for Samba, BIND, VSFTPD, etc.). And since I keep my /etc files backed up in CVS, rolling back any stupidity^H^H^H^H^H^H^H^H^Hunderstandable errors I might cause is easy.

archtoad6 08-01-2007 03:14 PM

I meant automating finding the changed files (*.new) & creating their back ups. Perhaps keeping a list, & perhaps also making diff files. The final possibility would be displaying the diff's & offering the appropriate choices -- ?? New, Old, Merge ??.

gilead 08-01-2007 04:29 PM

slackpkg provides most of that. IIRC, when it updates packages on the system it looks for .new files and provides the options to keep the originals, to overwrite them, to prompt for each one or to diff them. But at some point you have to read the diff and know whether you want to keep your original content or lose it.

davidguygc 08-01-2007 05:21 PM

Well, I went w/ the first suggestion, and, aside from a few things here and there, it seems to be working alright. Thanks for the help!

--David


All times are GMT -5. The time now is 08:34 AM.