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:
# yum update ... Updating : osad-5.11.33-1.el6.noarch 13/32 warning: /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:
# rpmconf -a Configuration file `/etc/sysconfig/rhn/osad.conf' -rw-rw-r--. 1 root root 1833 Jan 28 22:40 /etc/sysconfig/rhn/osad.conf -rw-rw-r--. 1 root root 1785 Feb 6 17:50 /etc/sysconfig/rhn/osad.conf.rpmnew ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions M : merge configuration files Z : background this process to examine the situation S : skip this file The default action is to keep your current version. *** aliases (Y/I/N/O/D/Z/S) [default=N] ? Your choice:
By default new configuration files are dropped and the existing versions kept.