Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

[FAQF] GF2: xx config files need updating

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

[FAQF] GF2: xx config files need updating

  • Quote

Post by pjp » Thu Jan 16, 2003 10:04 pm

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

Instructions are still needed on how to use etc-update.
Quis separabit? Quo animo?
Top
Noltha
n00b
n00b
User avatar
Posts: 6
Joined: Sat Apr 05, 2003 8:53 pm
Location: Spain

etc-update

  • Quote

Post by Noltha » Wed Apr 30, 2003 5:14 pm

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 :)
Top
papabean
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 130
Joined: Sat Oct 26, 2002 5:28 pm
Location: Sacramento, California
Contact:
Contact papabean
Website

  • Quote

Post by papabean » Wed Jul 02, 2003 1:36 am

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:
* 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: Select all

etc-update
"etc-update" will perform the necessary find command and return a list similar to:
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:
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:
/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.
%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.
%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.
%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:
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):
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:
Exiting: Nothing left to do; exiting. :)
-- The world is full of tough guys. It doesn't need me to be one too.
Top
slartibartfasz
Veteran
Veteran
User avatar
Posts: 1462
Joined: Tue Oct 29, 2002 10:27 pm
Location: Vienna, Austria

  • Quote

Post by slartibartfasz » Tue Aug 05, 2003 8:12 pm

@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.
Top
infamousmrsatan
Apprentice
Apprentice
User avatar
Posts: 201
Joined: Thu Jan 08, 2004 12:06 pm
Location: California

  • Quote

Post by infamousmrsatan » Tue Feb 17, 2004 1:57 am

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? ... 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!
Top
Hauser
l33t
l33t
User avatar
Posts: 650
Joined: Sat Dec 27, 2003 9:19 pm
Location: 4-dimensional hyperplane

  • Quote

Post by Hauser » Wed Jul 07, 2004 7:58 am

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!
Top
river14april
n00b
n00b
Posts: 3
Joined: Tue Jun 07, 2011 3:07 pm
Location: Manchester England

but what if find doesn't find all those files

  • Quote

Post by river14april » Tue Jun 07, 2011 4:08 pm

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~~
Top
Post Reply

7 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy