1
0
mirror of https://github.com/lxc/lxc-templates.git synced 2026-03-16 16:58:11 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Stéphane Graber
15f7c8361c
Merge pull request #70 from elboulangero/debian-kali-dhcpc-update
Updates Debian and Kali template regarding dhcp client
2026-03-11 13:33:16 -04:00
Arnaud Rebillout
8a81dd3fd6 lxc-kali: Select dhcpcd-base in place of isc-dchp-client
Being based on Debian testing, Kali now uses dhcpcd-base instead of
isc-dhcp-client.

Signed-off-by: Arnaud Rebillout <arnaudr@debian.org>
2026-03-11 23:13:08 +07:00
Arnaud Rebillout
48b89d884c lxc-debian: Fix a misleading error message
The wget command above uses the variable `MIRROR` and not
`DEBIAN_MIRROR`...

Signed-off-by: Arnaud Rebillout <arnaudr@debian.org>
2026-03-11 23:13:08 +07:00
Arnaud Rebillout
e21dc0318b lxc-debian: Add oldstable and oldoldstable to permanent releases
Signed-off-by: Arnaud Rebillout <arnaudr@debian.org>
2026-03-11 23:13:08 +07:00
Arnaud Rebillout
0d0ae9f09e lxc-debian: Use distro_codename in write_sourceslist
The variable `distro_codename` (introduced in previous commit) is a
better fit than `release` for places where we want to match a codename.

Signed-off-by: Arnaud Rebillout <arnaudr@debian.org>
2026-03-11 23:12:50 +07:00
Sven Geuer
c352d0c180 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>
2026-03-11 23:02:21 +07:00
2 changed files with 17 additions and 5 deletions

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
@ -238,7 +240,7 @@ write_sourceslist()
if [ "$mainonly" = 1 ]; then
non_main=''
else
case "$release" in
case "$distro_codename" in
wheezy|jessie|stretch|buster|bullseye)
non_main=' contrib non-free'
;;
@ -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,\
@ -806,7 +817,7 @@ if ! wget -q -O /dev/null "${release_file}"; then
fi
packages="debian-ports-archive-keyring,${packages}"
else
echo "Error: ${arch}/${release} not available on mirror ${DEBIAN_MIRROR}"
echo "Error: ${arch}/${release} not available on mirror ${MIRROR}"
exit 1
fi
fi
@ -877,7 +888,7 @@ if [ -n "$authkey" ]; then
fi
release=${release:-stable}
permanent_releases=('stable' 'testing' 'sid' 'unstable')
permanent_releases=('oldoldstable' 'oldstable' 'stable' 'testing' 'sid' 'unstable')
if [[ ! "${permanent_releases[*]}" =~ (^|[^[:alpha:]])$release([^[:alpha:]]|$) ]]; then
if ! release_info "${MIRROR}"; then
echo "Invalid release ${release} (not found in mirror)"

View File

@ -334,13 +334,14 @@ download_kali()
{
init=init
iproute=iproute2
dhcpclient=dhcpcd-base
packages=\
$init,\
ifupdown,\
locales,\
ca-certificates,\
dialog,\
isc-dhcp-client,\
$dhcpclient,\
netbase,\
net-tools,\
$iproute,\