#1042464 dhclient rewrites resolv.conf even if its content didn't change

Package:
isc-dhcp-client
Source:
isc-dhcp-client
Description:
DHCP client for automatically obtaining an IP address
Submitter:
Alex K
Date:
2026-08-05 17:33:11 UTC
Severity:
normal
#1042464#5
Date:
2023-07-28 16:02:31 UTC
From:
To:
We have a file integrity checking system installed and it alerts constantly b/c /etc/resolv.conf updates its timestamp on almost every invocation of dhclient tool. The fix is simple:
--- /sbin/dhclient-script.orig 2023-02-20 08:19:43.000000000 +0000
+++ /sbin/dhclient-script     2023-07-28 15:45:31.927151674 +0000
@@ -84,7 +84,7 @@
            chown --reference=$resolv_conf $new_resolv_conf
            chmod --reference=$resolv_conf $new_resolv_conf
        fi
-        mv -f $new_resolv_conf $resolv_conf
+       diff $new_resolv_conf $resolv_conf >/dev/null || mv -f $new_resolv_conf $resolv_conf
     # DHCPv6
     elif [ -n "$new_dhcp6_domain_search" ] || [ -n "$new_dhcp6_name_servers" ]; then
         resolv_conf=$(readlink -f "/etc/resolv.conf" 2>/dev/null) ||

Please, incorporate.

root@ip-172-26-5-140:/usr/sbin# uname -a
Linux ip-172-26-5-140 5.10.0-23-cloud-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux

root@ip-172-26-5-140:/usr/sbin# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian

#1042464#10
Date:
2026-08-05 17:31:09 UTC
From:
To:
Dear submitter,

as the package isc-dhcp has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1143544

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Thorsten Alteholz (the ftpmaster behind the curtain)