Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[FAQF] GF2: xx config files need updating
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16106
Location: Colorado

PostPosted: Thu Jan 16, 2003 10:04 pm    Post subject: [FAQF] GF2: xx config files need updating Reply with quote

This is the feedback thread for GF2: xx config files need updating.

Instructions are still needed on how to use etc-update.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
Noltha
n00b
n00b


Joined: 05 Apr 2003
Posts: 6
Location: Spain

PostPosted: Wed Apr 30, 2003 5:14 pm    Post subject: etc-update Reply with quote

Hi!

I think I can help about:

FAQs wrote:
Method using "etc-update":

Instructions needed.


I´m just using this metod:

1st I "unprotect" the /etc folder with:
CONFIG_PROTECT_MASK="/etc" or
CONFIG_PROTECT="-*"

2nd I just run etc-update, and the config files be updated. (use "diff" before run "etc-update" its a great idea)

Byez, sorry about my english :)
Back to top
View user's profile Send private message
papabean
Tux's lil' helper
Tux's lil' helper


Joined: 26 Oct 2002
Posts: 130
Location: Sacramento, California

PostPosted: Wed Jul 02, 2003 1:36 am    Post subject: Reply with quote

The above method would work if you've never modified any of your config files by hand. The real power of "etc-update" is more evident when it's used to merge the differences between the new config and the old config.

Method using "etc-update":

When confronted with the following:
Quote:
* GNU info directory index is up-to-date.
* IMPORTANT: 10 config files in /etc need updating.
* Type emerge --help config to learn how to update config files.

Type:
Code:
etc-update

"etc-update" will perform the necessary find command and return a list similar to:
Quote:
Scanning Configuration files...
Automerging trivial changes in: sample-tls.cf
Automerging trivial changes in: transport
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/ffserver.conf
/etc/._cfg0000_ffserver.conf
2) /etc/apache2/conf/modules.d/70_mod_php.conf
/etc/apache2/conf/modules.d/._cfg0000_70_mod_php.conf
3) /etc/conf.d/hdparm
/etc/conf.d/._cfg0000_hdparm
4) /etc/php/cli-php4/php.ini
/etc/php/cli-php4/._cfg0000_php.ini
5) /etc/postfix/main.cf
/etc/postfix/._cfg0000_main.cf
6) /etc/postfix/postfix-script
/etc/postfix/._cfg0000_postfix-script
7) /etc/postfix/sample/sample-ipv6.cf
/etc/postfix/sample/._cfg0000_sample-ipv6.cf
8) /etc/sound/events/gnomemeeting.soundlist
/etc/sound/events/._cfg0000_gnomemeeting.soundlist
Please select a file to edit by entering the corresponding number.
(-1 to exit) (-3 to auto merge all remaining files)
(-5 to auto-merge AND not use 'mv -i'):

Selecting any of these files from the list produces the following:
Quote:
Showing differences between /etc/postfix/main.cf and /etc/postfix/._cfg0000_main.cf
--- /etc/postfix/main.cf 2003-06-21 02:27:20.000000000 -0700
+++ /etc/postfix/._cfg0000_main.cf 2003-06-30 06:47:17.000000000 -0700
@@ -206,8 +206,8 @@
# with 450 (try again later) until you are certain that your
# local_recipient_maps settings are OK.
#
-unknown_local_recipient_reject_code = 550
-#unknown_local_recipient_reject_code = 450
+#unknown_local_recipient_reject_code = 550
+unknown_local_recipient_reject_code = 450

# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
-#home_mailbox = .maildir/
+home_mailbox = .maildir/
+home_mailbox = .maildir/

# The mail_spool_directory parameter specifies the directory where
# UNIX-style mailboxes are kept. The default setting depends on the
# system type.
#
-mail_spool_directory = /var/mail
+#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail

# The mailbox_command parameter specifies the optional external
@@ -635,4 +635,4 @@

# readme_directory: The location of the Postfix README files.
#
-readme_directory = /usr/share/doc/postfix-2.0.12-r1
+readme_directory = /usr/share/doc/postfix-2.0.13
1) Replace original with update
2) Delete update, keeping original as is
3) Interactively merge original with update
4) Show differences again
Please select from the menu above (-1 to ignore this update):

the postfix main.cf (#5) configuration file was chosen because it represents a clear case of a file that has been modified by hand and could cause the mail server to cease functioning if the configuration were blindly overwritten.

This is the same output provided by the "diff" command, but there are several options available.
They can be broken down as follows:

1. If the update seems trivial enough, go ahead and overwrite the original.
2. If the update seems unnecessary, keep the original.
3. View the changes and choose which changes to keep This is the option which offers the best flexibility.
4. Redisplay the differences between the two files.

The interactive option (#3) displays the differences one at a time, offering a choice of which change to keep.

Here's the option in action:
Quote:
/etc/postfix/._cfg0000_main.cf /etc/postfix/main.cf /etc/postfix/main.cf.merged
Merging /etc/postfix/._cfg0000_main.cf and /etc/postfix/main.cf
unknown_local_recipient_reject_code = 550 | #unknown_local_recipient_reject_code = 550
#unknown_local_recipient_reject_code = 450 | unknown_local_recipient_reject_code = 450

The file displayed on the left is the original and the new configuration is on the right. In this particular case, the change made to the configuration needs to stay the same. Pressing "l" will retain that modification.

Quote:
%l
#home_mailbox = .maildir/ | home_mailbox = .maildir/
> home_mailbox = .maildir/

Again, this is a change that should not be made, typing "l" will keep this intact.

Quote:
%l
readme_directory = /usr/share/doc/postfix-2.0.12-r1 | readme_directory = /usr/share/doc/postfix-2.0.13

Here's an example of the new configuration having more pertinent information. Since postfix's readmes are now located in a different directory, the configuration needs to reflect that. Pressing "r" selects the change from the updated configuration.

Quote:
%r
1) Replace /etc/postfix/main.cf with merged file
2) Show differences between merged file and original
3) Remerge original with update
4) Return to the previous menu
Please select from the menu above (-1 to exit, losing this merge):

At this point, a temporary file has been created that is a merged file containing the original with the updates that have been chosen prior.

These four options do the following:

1. Overwrite the original with the new merged file. This file is a result of the choices made in the above step.
2. Display the differences between the new merged file and the original configuration.
3. Start the interactive merging process over.
4. Make no changes and return to the list of files needing updating.

Selecting option 1 to replace the configuration file, we get:
Quote:
Replacing /etc/postfix/main.cf with /etc/postfix/main.cf.merged
mv: overwrite `/etc/postfix/main.cf'?
rm: remove regular file `/etc/postfix/._cfg0000_main.cf'?

Confirm the replacement of the config with a simple "y". Likewise, allow the ._cfg????_* file to be removed so that Portage no longer thinks this file needs updating.

After confirming the replacement, we are returned to (with the already update config file excluded):
Quote:
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/ffserver.conf
/etc/._cfg0000_ffserver.conf
2) /etc/apache2/conf/modules.d/70_mod_php.conf
/etc/apache2/conf/modules.d/._cfg0000_70_mod_php.conf
3) /etc/conf.d/hdparm
/etc/conf.d/._cfg0000_hdparm
4) /etc/php/cli-php4/php.ini
/etc/php/cli-php4/._cfg0000_php.ini
6) /etc/postfix/postfix-script
/etc/postfix/._cfg0000_postfix-script
7) /etc/postfix/sample/sample-ipv6.cf
/etc/postfix/sample/._cfg0000_sample-ipv6.cf
8) /etc/sound/events/gnomemeeting.soundlist
/etc/sound/events/._cfg0000_gnomemeeting.soundlist
Please select a file to edit by entering the corresponding number.
(-1 to exit) (-3 to auto merge all remaining files)
(-5 to auto-merge AND not use 'mv -i'):

After all of the files have been checked, changed and replaced, "etc-update" ends with:
Quote:
Exiting: Nothing left to do; exiting. :)

_________________
-- The world is full of tough guys. It doesn't need me to be one too.
Back to top
View user's profile Send private message
slartibartfasz
Veteran
Veteran


Joined: 29 Oct 2002
Posts: 1462
Location: vienna - austria

PostPosted: Tue Aug 05, 2003 8:12 pm    Post subject: Reply with quote

@papbean

u could add the 'er' and 'el' merge options and a link to the graphical etc-update thread, to give your faq the finishing touch :)
_________________
To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be.
Back to top
View user's profile Send private message
infamousmrsatan
Apprentice
Apprentice


Joined: 08 Jan 2004
Posts: 201
Location: California

PostPosted: Tue Feb 17, 2004 1:57 am    Post subject: Reply with quote

another option besides diff and etc-update is cfg-update.

is an etc-update like program with added features to prevent important files from being mangled, works in gui or tty (depending on diff program used: default is xxdiff), and is generally more user friendly than etc-update.

More information on how to obtain and use cfg-update is here:

http://forums.gentoo.org/viewtopic.php?t=86622&highlight=

I tried it and liked it. Hopefully it will be in portage soon.
_________________
Registered Linux User 344425
Join the adopt an unanswered post initiative today!
Por favor, corrija mi espanol!
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Wed Jul 07, 2004 7:58 am    Post subject: Reply with quote

If you already know what files you've modified, go through the file list, pick out these files first and upate them as papabean says. After this, you'll be left with those files you've never edited or would never think of touching them whatsoever (you do need to be sure about this! :wink:), then you may use "-5" which many people call an 'evil' option; but when you're faced with over 100 to-be-updated files, this option can be very handy! (I'd dare this evil!) :)
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
river14april
n00b
n00b


Joined: 07 Jun 2011
Posts: 3
Location: Manchester England

PostPosted: Tue Jun 07, 2011 4:08 pm    Post subject: but what if find doesn't find all those files Reply with quote

I have tried to follow this, but am confused. find identifies only two cfg files, but emerge is complaining about 40 of them.

Also when logging in to a console I am getting a list of missing variable settings that appears between typing the username and entering the password. I haven't figured out a way of capturing them automatically, but the gist of them is that some variable is not set and I must tell "an administrator". Well I told the admin (who is me) and admin didn't know any more than I did ;)

Should I copy type these messages next time I log in, or have I said enough to identify the issue? Is there a log where such messages might appear (tried dmesg, they are not there, where else might they be?)

I also found a directory possibly missing, /etc/profile.d - this did not cause any error messages, as the script in /etc/profile checks if the files in it are executable, and ignores them if they are not executable/not existing.

I am almost certain I broke something myself (I am a recent returner to Gentoo after years away, last time round we were still doing stage 1-2-3 etc) and have been twiddling too many settings at once, this issue is down to me and not a bug.

Having got myself here my best thought is too (1) keep the kernel settings from /usr/src/linuxXXX/.config, (2) keep the portage tree, and then (3) install again from scratch. Anyone got any better suggestions?

River~~
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum