1 |
I've been working on something to aid handling incoming ._cfg0000* |
2 |
files that occur during emerges at times. |
3 |
|
4 |
I know we have at least a couple of tools already for this, but I |
5 |
wanted something much closer to manual handling but still doing most |
6 |
of the drudgery. |
7 |
|
8 |
I used the term `rough' in the subject but that may be a little overly |
9 |
kind. Prospective users may find the script rather primitive. |
10 |
|
11 |
|
12 |
But if anyone can make use of it please do. And if anyone has |
13 |
comments or wants to pass along any edits they think will improve it |
14 |
please do that too. |
15 |
|
16 |
The script tries to report what its doing as it goes along, prior to |
17 |
actually doing anything. And provides several opportunities to bail. |
18 |
|
19 |
It has a usage message that explains things. `updetc.pl help' to see |
20 |
it. |
21 |
|
22 |
People may not like that it creates directories throughout the file |
23 |
system but I like keeping the various configs for a while so this does |
24 |
it for me in some orderly way yet avoids any problems with leaving |
25 |
renamed files in working directories like /etc/init.d or /etc/conf.d. |
26 |
|
27 |
`updetc.pl' finds the new configs and their counterpart [if it exits]. |
28 |
Offers you a chance to see a diff then copies and moves the files |
29 |
around so that you end up with your choice on the system. |
30 |
|
31 |
A copy of both the working version and the new one with a dated |
32 |
extension and indicative string pre-pended (START-USE STOP-USE NOUSE) |
33 |
are kept in a special directory (START_STOP/) at the same level as the |
34 |
config files. |
35 |
|
36 |
The script does not try to automate everything. It offers a |
37 |
pre assembled diff cmd to past into a cmd prompt for a quick look at |
38 |
the differences of new and old. And handles the copy move rename |
39 |
and mkdir chores. |
40 |
|
41 |
I thought I'd prefer to leave the `diff' part to user if they wanted a |
42 |
diff, rather than coding it in perl or using perl modules. Instead |
43 |
just offer a pre-assembled command to make it easier. |
44 |
|
45 |
Any merging or the like is up to the user. Straight yes or no about |
46 |
the new conf is handled by updetc.pl. |
47 |
|
48 |
I've included the bare script in line at the end but to encourage |
49 |
people to try it out, a little package can be grabbed at URL below |
50 |
containing a ready to go sandbox for testing. (Note that |
51 |
I have NOT tested this extensively so use at your own RISK |
52 |
I am using it on my real filesystem now for a couple of weeks) |
53 |
|
54 |
http://www.jtan.com/~reader/updetc <updetc*.tar.gz> |
55 |
|
56 |
The ready to go sandbox includes an assortment of ._cfg000*, a directory |
57 |
hierarchy along with corresponding system config files and the script. |
58 |
|
59 |
Expect these directories and files in the compressed tar file. |
60 |
./test_updetc/ |
61 |
etc1/ test directory hierarchy - assorted ._cfg0000* and some |
62 |
system counterparts |
63 |
|
64 |
etc2/ replace from this for further testing> |
65 |
(Just a copy of etc1) |
66 |
|
67 |
updetc.pl |
68 |
|
69 |
My direct email is <reader@×××××××.com> |
70 |
|
71 |
-- |
72 |
gentoo-user@g.o mailing list |