如何在“ yum更新”之后以交互方式合并配置文件


8

用“ yum update”更新系统软件包后,无法替换无法覆盖的配置文件,但是我们可以在附近找到* .rpmnew文件。根据设计,系统管理员必须合并配置文件。

在Gentoo Linux中,有一个etc-update工具,它允许交互地合并配置文件更改,例如:

Beginning of differences between /etc/pear.conf and /etc/._cfg0000_pear.conf
[...]
End of differences between /etc/pear.conf and /etc/._cfg0000_pear.conf
1) Replace original with update
2) Delete update, keeping original as is
3) Interactively merge original with update
4) Show differences again

我想知道是否有一种方法可以在RHEL / Fedora / CentOS中以交互方式合并配置?

Answers:



5

我发现与Gentoo最接近的etc-updaterpmconf

# yum install -y rpmconf    
# rpmconf -a
Configuration file `/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.25-5.b18.fc21.x86_64/jre/lib/security/US_export_policy.jar'
-rw-r--r--. 1 root root 620 Oct  2 16:38 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.25-5.b18.fc21.x86_64/jre/lib/security/US_export_policy.jar
-rw-r--r--. 1 root root 620 Dec 15 12:11 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.25-5.b18.fc21.x86_64/jre/lib/security/US_export_policy.jar.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: Y

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.