Short tip: Analyze new configuration files deployed by RPM
Often configuration files are also updated during the installation of newer RPM packages. Using the package manager yum
you're informed about that like this:
1# yum update
2...
3 Updating : osad-5.11.33-1.el6.noarch 13/32
4warning: /etc/sysconfig/rhn/osad.conf created as /etc/sysconfig/rhn/osad.conf.rpmnew
If you're looking carefully at the output of the yum
command you can compare the appropriate configuration files afterwards manually using diff
. If you're managing plenty of systems you might have a automated solution like Red Hat Satellite or Spacewalk - maybe there is also no such a log.
In short: this can be done more elegant - using rpmconf
. This little tools searches for files ending with .rpmsave
and .rpmnew
and asks what to do with those files. Using this new versions of configuration files can be compared easily. Often it is not worth it to replace (and afterwards modify) existing configuration files because only comments and unused configuration values are changed.
The most interesting paremeters of rpmconf
might be:
-a
- searches for new configuration files of all installed RPM packages-c
- searches and deleted orphaned new configuration files
If the little helper finds new configuration files it is possible to compare, combine, reject or skip them. Controlling the particular functions is done using letter commands (see beyond).
It is a good idea to run this utility after bigger system updates to look for new configuration files:
1# rpmconf -a
2
3Configuration file `/etc/sysconfig/rhn/osad.conf'
4-rw-rw-r--. 1 root root 1833 Jan 28 22:40 /etc/sysconfig/rhn/osad.conf
5-rw-rw-r--. 1 root root 1785 Feb 6 17:50 /etc/sysconfig/rhn/osad.conf.rpmnew
6 ==> Package distributor has shipped an updated version.
7 What would you like to do about it ? Your options are:
8 Y or I : install the package maintainer's version
9 N or O : keep your currently-installed version
10 D : show the differences between the versions
11 M : merge configuration files
12 Z : background this process to examine the situation
13 S : skip this file
14 The default action is to keep your current version.
15*** aliases (Y/I/N/O/D/Z/S) [default=N] ?
16Your choice:
By default new configuration files are dropped and the existing versions kept.