Skip to content
Snippets Groups Projects
Unverified Commit 1e56231c authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

Allow to define the distribution to install

Support bullseye and bookworm (maybe more, only checked those).

Refs. sysadm-environment#5543
parent 5f697839
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
set -ex
DEFAULT_DISTRIBUTION=bookworm
BASEDIR=$(readlink -f "$(dirname "$0")/..")
HOSTNAME=$1
# Allow to define the intermediary IPXE_TARGET folder. This can pose problem
......@@ -26,7 +27,10 @@ cp ${BASEDIR}/configs/template.ipxe.j2 $TEMPLATE_IPXE_TMP
# Set optional value IPXE_NET directly if not provided in the yaml
# (missing templating variable will make the j2 call fail otherwise)
grep "IPXE_NET" $CONFIG >/dev/null || sed -i s'/{{IPXE_NET}}/net0/g' "${TEMPLATE_IPXE_TMP}"
grep "IPXE_NET" $CONFIG >/dev/null || \
sed -i s'/{{IPXE_NET}}/net0/g' "${TEMPLATE_IPXE_TMP}"
grep "DISTRIBUTION" $CONFIG >/dev/null || \
sed -i s"/{{DISTRIBUTION}}/${DEFAULT_DISTRIBUTION}/g" "${TEMPLATE_IPXE_TMP}"
j2 -f yaml "${TEMPLATE_IPXE_TMP}" "${CONFIG}" > "${IPXE_SCRIPT}"
......
......@@ -34,7 +34,7 @@ prompt --key 0x02 --timeout 2000 Installer failed... press Ctrl-B for the iPXE c
# with today's very large certificate sizes, ipxe can't really do a TLS handshake anymore)
set mirror http://deb.debian.org
set base_path ${mirror}/debian/dists/bookworm/main/installer-amd64/current/images/netboot/debian-installer/amd64
set base_path ${mirror}/debian/dists/{{DISTRIBUTION}}/main/installer-amd64/current/images/netboot/debian-installer/amd64
set preseed_host http://preseed.internal.softwareheritage.org
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment