TIP Colorized Config Management
From Gentoo Linux Wiki
- This page is a candidate for deletion
- Reason given: Already mostly in HOWTO etc-update. Can be easily completely merged
- If you disagree with its deletion, please explain why on its discussion page.
- If you intend to fix it, please remove this notice, but do not remove this notice from articles that you have created yourself.
- Make sure no other pages link here and check the page's history before deleting.
| Terminals / Shells • Network • X Window System • Portage • System • Filesystems • Kernel • Other |
Contents |
[edit] Introduction
The output of etc-update and dispatch-conf makes it difficult to discern the original parts of the configuration files from the new parts. By colorizing the output, it is much easier to visualize the differences.
[edit] Setup
First emerge colordiff:
# emerge -av colordiff
Or if you want to use KDiff3:
# emerge -av kdiff3
[edit] etc-update
Now configure etc-update to use colordiff/kdiff3. Edit /etc/etc-update.conf and change the diff_command variable to the following:
| File: /etc/etc-update.conf |
|
for colordiff: diff_command="colordiff -u %file1 %file2" for kdiff3: diff_command="kdiff3 %file1 %file2" using_editor=1 |
[edit] dispatch-conf
The TIP dispatch-conf article details how to achieve the same with dispatch-conf.
