mirror of
https://github.com/lxc/lxc-templates.git
synced 2026-09-19 06:21:29 +00:00
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:
committed by
Arnaud Rebillout
parent
c128b962b3
commit
c352d0c180
+12
-1
@@ -77,6 +77,8 @@ release_info() {
|
|||||||
local release_file=$(wget "${1}/dists/${release}/Release" -O - --quiet 2> /dev/null)
|
local release_file=$(wget "${1}/dists/${release}/Release" -O - --quiet 2> /dev/null)
|
||||||
distro_suite=${release_file#*Suite: }
|
distro_suite=${release_file#*Suite: }
|
||||||
distro_suite=${distro_suite%%$'\n'*}
|
distro_suite=${distro_suite%%$'\n'*}
|
||||||
|
distro_codename=${release_file#*Codename: }
|
||||||
|
distro_codename=${distro_codename%%$'\n'*}
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
@@ -374,13 +376,22 @@ download_debian()
|
|||||||
iproute=iproute2
|
iproute=iproute2
|
||||||
;;
|
;;
|
||||||
esac
|
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=\
|
packages=\
|
||||||
$init,\
|
$init,\
|
||||||
ifupdown,\
|
ifupdown,\
|
||||||
locales,\
|
locales,\
|
||||||
ca-certificates,\
|
ca-certificates,\
|
||||||
dialog,\
|
dialog,\
|
||||||
isc-dhcp-client,\
|
$dhcpclient,\
|
||||||
netbase,\
|
netbase,\
|
||||||
net-tools,\
|
net-tools,\
|
||||||
$iproute,\
|
$iproute,\
|
||||||
|
|||||||
Reference in New Issue
Block a user