From e8206bb9681361fbeed79ecf7407ab3e1f53da54 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Tue, 3 Nov 2026 19:34:23 +0100 Subject: [PATCH] Leave dhclient leases of Debian and Ubuntu out of captures dhclient keeps its leases in /var/lib/dhcp there, and on EL also as *.leases next to the *.lease files already excluded. Keep dhcpd.leases of a DHCP server, which lives in the same directory. --- imgutil/imgutil | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imgutil/imgutil b/imgutil/imgutil index 42a425bb..37d96ec2 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -165,7 +165,9 @@ CAPTURE_DIRS_ONLY = ('/var/log', '/var/cache/apt') # writes the node's own (as with the netplan files masked in capture_fs) CAPTURE_DROP_FILES = ( '/var/lib/systemd/random-seed', '/var/lib/rsyslog/imjournal.state', - '/var/lib/NetworkManager/*.lease', '/var/lib/dhclient/*.lease', + '/var/lib/NetworkManager/*.lease', '/var/lib/dhclient/*.lease*', + # dhclient on Debian and Ubuntu, unlike dhcpd.leases of a DHCP server + '/var/lib/dhcp/dhclient*.leases', '/root/.*_history', '/root/.lesshst', '/root/.viminfo', '/etc/NetworkManager/system-connections/*', '/etc/sysconfig/network-scripts/ifcfg-*')