~mikini/hometools

915ac405fdcebf9d8ce88bbf30195e8ad0d58d33 — Mikkel Kirkgaard Nielsen 10 months ago a05403e
Add script for APT package config file change detection
1 files changed, 14 insertions(+), 0 deletions(-)

A dpkg-conf-diff
A dpkg-conf-diff => dpkg-conf-diff +14 -0
@@ 0,0 1,14 @@
#! /bin/bash

# Pull md5 sums for package configuration files from APT db, print filename if
# file on disk differs.
#
# Inspired by;
# https://serverfault.com/questions/90400/how-to-check-for-modified-config-files-on-a-debian-system/90401#90401
#
# For exact diffs try;
# https://www.win.tue.nl/~rp/dpkg-bin/dpkgdiff

echo Configuration files contained in APT packages whose md5 hash has changed on disk.
echo
dpkg-query --show --showformat='${Conffiles}\n' '*' | awk 'OFS="  "{print $2,$1}' | LANG=C md5sum -c 2>/dev/null | awk -F': ' '$2 !~ /OK$/{print $1}' | sort