lxc-debian: Select dhcp-client according to release

isc-dhcp-client is being phased out in Debian, and it was recently
removed from forky/testing due to https://bugs.debian.org/1106121.

For releases with codename trixie and before select isc-dhcp-client,
otherwise select dhcpcd-base. This way the dhcp-client installed in the
container matches the one that comes with the respective release by default.

This change was discussed at https://bugs.debian.org/1125011.

Signed-off-by: Arnaud Rebillout <arnaudr@debian.org>
This commit is contained in:
Sven Geuer
2026-03-11 23:02:21 +07:00
committed by Arnaud Rebillout
parent c128b962b3
commit c352d0c180
+12 -1
View File
@@ -77,6 +77,8 @@ release_info() {
local release_file=$(wget "${1}/dists/${release}/Release" -O - --quiet 2> /dev/null)
distro_suite=${release_file#*Suite: }
distro_suite=${distro_suite%%$'\n'*}
distro_codename=${release_file#*Codename: }
distro_codename=${distro_codename%%$'\n'*}
return 0
fi
return 1
@@ -374,13 +376,22 @@ download_debian()
iproute=iproute2
;;
esac
# Check by codename as stable and testing are moving targets
case "$distro_codename" in
wheezy|jessie|stretch|buster|bullseye|bookworm|trixie)
dhcpclient=isc-dhcp-client
;;
*)
dhcpclient=dhcpcd-base
;;
esac
packages=\
$init,\
ifupdown,\
locales,\
ca-certificates,\
dialog,\
isc-dhcp-client,\
$dhcpclient,\
netbase,\
net-tools,\
$iproute,\