From 54e329b9cd0f9e9a9393f3541e384c0a0765589b Mon Sep 17 00:00:00 2001
From: Lars Frost <larsf@fsmpi.rwth-aachen.de>
Date: Sat, 18 Jun 2022 02:27:29 +0200
Subject: [PATCH] make preseed compatible with TARDIS for kubuntu 22.04

---
 preseed/lip-early.sh | 5 ++++-
 preseed/lip.seed     | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/preseed/lip-early.sh b/preseed/lip-early.sh
index 145c0fc..8862c1a 100755
--- a/preseed/lip-early.sh
+++ b/preseed/lip-early.sh
@@ -1,4 +1,7 @@
 #!/bin/sh
+# in earlier releases (but not in kubuntu 22.04), this mount was done automatically
+mkdir -p /root/isodevice
+mount /dev/disk/by-label/LIPSTICK /root/isodevice
 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 # only relevant for kubuntu <= 20.04
 echo "deb [ arch=amd64 trusted=yes ] file:///isodevice/archives-$(sed -n 's/DISTRIB_CODENAME=\([a-z]\+\)/\1/p' /root/etc/lsb-release) $(sed -n 's/DISTRIB_CODENAME=\([a-z]\+\)/\1/p' /root/etc/lsb-release) lip" >> /root/etc/apt/sources.list
@@ -7,4 +10,4 @@ echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ $(sed -n 's/DISTRIB_CODENAME
 echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ $(sed -n 's/DISTRIB_CODENAME=\([a-z]\+\)/\1/p' /root/etc/lsb-release)-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
+sh /root/cdrom/preseed/lipnsa.hook.sh /root/isodevice
diff --git a/preseed/lip.seed b/preseed/lip.seed
index a91650a..1a82568 100644
--- a/preseed/lip.seed
+++ b/preseed/lip.seed
@@ -1,5 +1,5 @@
-d-i preseed/early_command string sh /root/isodevice/preseed/lip-early.sh
-d-i ubiquity/success_command string sh /isodevice/preseed/lip-success.sh
+d-i preseed/early_command string sh /root/cdrom/preseed/lip-early.sh
+ubiquity ubiquity/success_command string sh /cdrom/preseed/lip-success.sh
 d-i clock-setup/utc boolean false
 d-i time/zone string Europe/Berlin
 ubiquity ubiquity/use_nonfree boolean true
-- 
GitLab