Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 04-10-2021, 12:55 AM   #1
Senior Member
Registered: Oct 2007
Distribution: Slackware
Posts: 1,214

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

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:


cd /etc

find . -name "*.new" | while read configfile ; do
if [ ! "$configfile" = "./rc.d/" \
-a ! "$configfile" = "./rc.d/" \
-a ! "$configfile" = "./" \
-a ! "$configfile" = "./" \
-a ! "$configfile" = "./" ]; 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)
There are of course some sensible exclusions there and my suggestion is that the following file could be added to these:

-a ! "$configfile" = "./rc.d/" \
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 ''?

Last edited by andrew.46; 04-10-2021 at 01:20 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] awk question - read in txt files, offset data by given amount, output new txt files pomico Programming 19 09-17-2012 11:43 AM
Copy the contents of a txt file to other txt files (with similar names) by cp command TheIndependentAquarius Linux - Newbie 7 07-03-2010 12:54 AM
Gnome Desktop makes 10 point font look like 64 point - how do I fix it? TonyC Linux - Desktop 5 03-03-2009 12:22 AM
cat onelinefile.txt >> newfile.txt; cat twofile.txt >> newfile.txt keep newline? tmcguinness Programming 4 02-12-2009 06:38 AM
How can read from file.txt C++ where can save this file(file.txt) to start reading sam_22 Programming 1 01-11-2007 05:11 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration