I've been working on something to aid handling incoming ._cfg0000*
files that occur during emerges at times.

I know we have at least a couple of tools already for this, but I
wanted something much closer to manual handling but still doing most
of the drudgery.

I used the term `rough' in the subject but that may be a little overly
kind. Prospective users may find the script rather primitive.


But if anyone can make use of it please do.  And if anyone has
comments or wants to pass along any edits they think will improve it
please do that too.

The script tries to report what its doing as it goes along, prior to
actually doing anything. And provides several opportunities to bail.

It has a usage message that explains things. `updetc.pl help' to see
it.

People may not like that it creates directories throughout the file
system but I like keeping the various configs for a while so this does
it for me in some orderly way yet avoids any problems with leaving
renamed files in working directories like /etc/init.d or /etc/conf.d.

`updetc.pl' finds the new configs and their counterpart [if it exits]. 
Offers you a chance to see a diff then copies and moves the files
around so that you end up with your choice on the system.

A copy of both the working version and the new one with a dated
extension and indicative string pre-pended (START-USE STOP-USE NOUSE)
are kept in a special directory (START_STOP/) at the same level as the
config files.

The script does not try to automate everything.  It offers a  
pre assembled diff cmd to past into a cmd prompt for a quick look at
the differences of new and old.  And handles the copy move rename
and mkdir chores. 

I thought I'd prefer to leave the `diff' part to user if they wanted a
diff, rather than coding it in perl or using perl modules.  Instead
just offer a pre-assembled command to make it easier.

Any merging or the like is up to the user.  Straight yes or no about
the new conf is handled by updetc.pl.

I've included the bare script in line at the end but to encourage
people to try it out, a little package can be grabbed at URL below
containing a ready to go sandbox for testing.  (Note that
I have NOT tested this extensively so use at your own RISK
I am using it on my real filesystem now for a couple of weeks)

 http://www.jtan.com/~reader/updetc  <updetc*.tar.gz>

The ready to go sandbox includes an assortment of ._cfg000*, a directory
hierarchy along with corresponding system config files and the script.

Expect these directories and files in the compressed tar file.
./test_updetc/
    etc1/  test directory hierarchy - assorted ._cfg0000* and some
           system counterparts

    etc2/ replace from this for further testing> 
         (Just a copy of etc1)

    updetc.pl

My direct email is <[EMAIL PROTECTED]>

-- 
[EMAIL PROTECTED] mailing list

Reply via email to