Article 5GDGM Suggestion for UPGRADE.TXT (point 5: Fix your config files.)

Suggestion for UPGRADE.TXT (point 5: Fix your config files.)

by
andrew.46
from LinuxQuestions.org on (#5GDGM)
I have a very small suggestion, with the upcoming Slackware 15 release, for point 5 in the file UPGRADE.TXT. This section deals with moving over config files with the '.new' extension. There is a small script suggested which copies files over and leaves a '.bak' backup behind. Just to refresh people's minds the script is as follows:

Code:#!/bin/sh

cd /etc

find . -name "*.new" | while read configfile ; do
if [ ! "$configfile" = "./rc.d/rc.inet1.conf.new" \
-a ! "$configfile" = "./rc.d/rc.local.new" \
-a ! "$configfile" = "./group.new" \
-a ! "$configfile" = "./passwd.new" \
-a ! "$configfile" = "./shadow.new" ]; then
cp -a $(echo $configfile | rev | cut -f 2- -d . | rev) \
$(echo $configfile | rev | cut -f 2- -d . | rev).bak 2> /dev/null
mv --verbose $configfile $(echo $configfile | rev | cut -f 2- -d . | rev)
fi
doneThere are of course some sensible exclusions there and my suggestion is that the following file could be added to these:

Code:-a ! "$configfile" = "./rc.d/rc.modules.local.new" \Through my own blind use of this script (great script but stupid user) I inadvertently stopped DKMS module rebuilding my NVidia driver whenever I changed kernels. Fixed on my own system with the above line (and restored from the .bak file) but perhaps this might be a useful addition?

Mind you I guess the script could exclude all files in /etc that have the suffix '.local.new'?latest?d=yIl2AUoC8zA latest?i=xiIC2XBYWwE:IBejttwCqBw:F7zBnMy latest?i=xiIC2XBYWwE:IBejttwCqBw:V_sGLiP latest?d=qj6IDK7rITs latest?i=xiIC2XBYWwE:IBejttwCqBw:gIN9vFwxiIC2XBYWwE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments