From 120c951b5de4beaf4158a9cd46e8aaee5f8cfa9f Mon Sep 17 00:00:00 2001
From: valentin <valentinb@fsmpi.rwth-aachen.de>
Date: Sat, 16 Oct 2021 14:24:35 +0200
Subject: [PATCH] lip seed: use lsb-release for distribution code name

---
 preseed/lip-early.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/preseed/lip-early.sh b/preseed/lip-early.sh
index 4831861..adafb34 100755
--- a/preseed/lip-early.sh
+++ b/preseed/lip-early.sh
@@ -1,10 +1,11 @@
 #!/bin/sh
+source /root/etc/lsb-release
 sed -i -e '/ubuntu\.com/d' -e '/^$/d' /root/etc/apt/sources.list
 sed -i -e 's/lsb_release\.get_lsb_information()/lsb_release.get_distro_information()/g' /root/usr/bin/apt-clone
-echo "deb [ arch=amd64 trusted=yes ] file:///isodevice/archives eoan lip" >> /root/etc/apt/sources.list
-echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ eoan main restricted universe multiverse" >> /root/etc/apt/sources.list
-echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ eoan-security main restricted universe multiverse" >> /root/etc/apt/sources.list
-echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ eoan-updates main restricted universe multiverse" >> /root/etc/apt/sources.list
+echo "deb [ arch=amd64 trusted=yes ] file:///isodevice/archives ${DISTRIB_CODENAME} lip" >> /root/etc/apt/sources.list
+echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ ${DISTRIB_CODENAME} main restricted universe multiverse" >> /root/etc/apt/sources.list
+echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ ${DISTRIB_CODENAME}-security main restricted universe multiverse" >> /root/etc/apt/sources.list
+echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ ${DISTRIB_CODENAME}-updates main restricted universe multiverse" >> /root/etc/apt/sources.list
 chroot /root /usr/bin/apt-get update
 chroot /root /usr/bin/apt-get -y install $(grep '^[^|#]*L[^|]*|' /root/isodevice/packages | cut -d'|' -f 2)
 ./root/isodevice/preseed/lipnsa.hook.sh
-- 
GitLab