From 159f30e3ea2dfdfc37ac3d73153c62834a1763ba Mon Sep 17 00:00:00 2001 From: zraktvor <zraktvor@protonmail.com> Date: Sat, 18 Jun 2022 02:04:27 +0200 Subject: [PATCH] add some optional debugging to lip-early.sh --- preseed/lip-early.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/preseed/lip-early.sh b/preseed/lip-early.sh index 8862c1a..e45c072 100755 --- a/preseed/lip-early.sh +++ b/preseed/lip-early.sh @@ -1,4 +1,16 @@ #!/bin/sh + +## ARGS +IS_DEBUG=0 + +## SCRIPT + +debug() { + if [ "$IS_DEBUG" = "1" ]; then + "$@" + fi +} + # 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 @@ -8,6 +20,13 @@ echo "deb [ arch=amd64 trusted=yes ] file:///isodevice/archives-$(sed -n 's/DIST echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ $(sed -n 's/DISTRIB_CODENAME=\([a-z]\+\)/\1/p' /root/etc/lsb-release) main restricted universe multiverse" >> /root/etc/apt/sources.list echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ $(sed -n 's/DISTRIB_CODENAME=\([a-z]\+\)/\1/p' /root/etc/lsb-release)-security main restricted universe multiverse" >> /root/etc/apt/sources.list 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 + +debug echo "As far as I know, there are no logs of anything, which is run in casper. So I sleep here, allowing me to view potential errors ..." +debug sleep 30 + chroot /root /usr/bin/apt-get update chroot /root /usr/bin/apt-get -y install $(grep '^[^|#]*L[^|]*|' /root/isodevice/packages | cut -d'|' -f 2) sh /root/cdrom/preseed/lipnsa.hook.sh /root/isodevice + +debug echo "As far as I know, there are no logs of anything, which is run in casper. So I sleep here, allowing me to view potential errors ..." +debug sleep 30 -- GitLab