[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] 3 commits: Fix a typo

Mike Gabriel (@sunweaver) gitlab at salsa.debian.org
Wed Oct 14 07:22:50 BST 2026



Mike Gabriel pushed to branch master at Debian Edu / debian-edu-config


Commits:
e48dde44 by Roland Clobus at 2026-10-13T20:59:58+02:00
Fix a typo

Gbp-Dch: ignore

- - - - -
ab7380d6 by Roland Clobus at 2026-10-13T21:47:23+02:00
ltsp-install: Synchronise dlw to x2go (Closes: #1150421)

Use the same order in the code for dlw as for x2go

- - - - -
503dfd56 by Roland Clobus at 2026-10-13T21:47:33+02:00
ltsp-install: Run outside of d-i

The script can be run outside the d-i environment.
If the BD ISO was used to install, and it is still available, use the
packages on the BD ISO instead of downloading them.

- - - - -


1 changed file:

- sbin/debian-edu-ltsp-install


Changes:

=====================================
sbin/debian-edu-ltsp-install
=====================================
@@ -452,12 +452,14 @@ cat <<EOF > /etc/ltsp/skel/.x2goclient/settings
 show=false
 EOF
 
-# Specific settings needed if BD ISO image is used for installation inside d-i.
-# First part of next condition: Looking for file created by base-installer and
-# removed at the end of the d-i run.
-if [ -e /etc/apt/apt.conf.d/00IgnoreTimeConflict ] && grep -q BD /etc/apt/sources.list ; then
+# If the BD ISO image is used, ensure that it is mounted.
+if grep -q BD /etc/apt/sources.list && ! mountpoint -q /media/cdrom ; then
+	bd_iso_was_mounted="yes"
+	mount /media/cdrom -o ro
+fi
+# If the BD ISO image is used, get as many packages as possible from the BD image instead of downloading them.
+if grep -q BD /etc/apt/sources.list && [ -e /media/cdrom/.disk/cd_type ] ; then
 	BD_ISO="true";
-	device="$(grep media/cdrom /etc/fstab | cut -d' ' -f1)"
 	mirror="file:///media/cdrom/"
 else
 	mirror="http://deb.debian.org/debian"
@@ -486,7 +488,7 @@ debootstrap --arch="$arch" --no-check-gpg --variant=minbase --include=sitesummar
 	mount proc -t proc /srv/ltsp/x2go-"$thin_type"-"$arch"/proc
 	if [ "true" == "$BD_ISO" ] ; then
 		mkdir -p /srv/ltsp/x2go-"$thin_type"-"$arch"/media/cdrom
-		mount "$device" /srv/ltsp/x2go-"$thin_type"-"$arch"/media/cdrom -o ro
+		mount /media/cdrom /srv/ltsp/x2go-"$thin_type"-"$arch"/media/cdrom -o bind
 		echo "deb [trusted=yes] $mirror $dist main" > /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/apt/sources.list
 	fi
 	chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt -y -qq install education-thin-client p910nd
@@ -613,7 +615,7 @@ EOF
 	echo "search intern" >> /etc/resolv.conf
 	# Temporary workaround needed to turn DLW images into machines of profile type 'Workstation'
 	sed -i /etc/debian-edu/config -e "s/^PROFILE=.*/PROFILE=\"Workstation\"/g"
-	# Create SqashFS image.
+	# Create SquashFS image.
 	ltsp image /,,/boot,subdir=boot,,/usr,subdir=usr,,/var,subdir=var
 	# Revert resolver workaround from above.
 	rm -f /etc/resolv.conf
@@ -644,20 +646,27 @@ POST_INIT_USE_FQDN="sed -i '/10.0.2.2/ s/server/tjener.intern tjener/' /etc/host
 EOF
 	mkdir -p /srv/ltsp/dlw
 	chmod 755 /srv/ltsp/dlw
-	# Use BD-ISO if available.
-	if [ "true" == "$BD_ISO" ] && ! mountpoint -q /media/cdrom ; then
-		mount /media/cdrom
+	# Install base system
+	debootstrap --arch="$arch" --no-check-gpg --variant=minbase --include=locales,console-setup,linux-image-"$kernel_arch" "$dist" /srv/ltsp/dlw "$mirror"
+	# Unset temporary directory variables to avoid problems when directory
+	# is missing inside the chroot. https://bugs.debian.org/765443
+	unset TMPDIR TEMP TEMPDIR TMP
+	chroot /srv/ltsp/dlw/ apt clean
+	# Care for complete sources list (security, also nonfree -- in case firmware is needed).
+	if [ -e /srv/ltsp/dlw/usr/share/doc/apt/examples/sources.list ] ; then
+		# Up to bookworm
+		chroot /srv/ltsp/dlw/ sh -c "cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list.d/full.list"
+	else
+		# Since trixie
+		chroot /srv/ltsp/dlw/ sh -c "cp /usr/share/doc/apt/examples/debian.sources /etc/apt/sources.list.d/debian_full.sources"
 	fi
-	if grep -q BD /etc/apt/sources.list && [ -f /media/cdrom/.disk/info ] ; then
+	mount /dev/pts -t devpts /srv/ltsp/dlw/dev/pts
+	mount proc -t proc /srv/ltsp/dlw/proc
+	if [ "true" == "$BD_ISO" ] ; then
 		mkdir -p /srv/ltsp/dlw/media/cdrom
-		mount --bind /media/cdrom /srv/ltsp/dlw/media/cdrom
-		mirror="file:///media/cdrom/"
+		mount /media/cdrom /srv/ltsp/dlw/media/cdrom -o bind
+		echo "deb [trusted=yes] $mirror $dist main" > /srv/ltsp/dlw/etc/apt/sources.list
 	fi
-	# Install base system
-	debootstrap --arch="$arch" --no-check-gpg --variant=minbase --include=locales,console-setup,linux-image-"$arch" "$dist" /srv/ltsp/dlw "$mirror"
-
-	# Care for complete sources list (security, also nonfree -- in case firmware is needed).
-	chroot /srv/ltsp/dlw sh -c "cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list.d/full.list"
 
 	# Care for same locale and keyboard settings in the chroot, also useful to quiet down Perl.
 	cp /etc/locale.gen /srv/ltsp/dlw/etc/
@@ -668,14 +677,6 @@ EOF
 	chroot /srv/ltsp/dlw setupcon -k
 
 	# Care for special files.
-	# Unset temporary directory variables to avoid problems when directory
-	# is missing inside the chroot. https://bugs.debian.org/765443
-	unset TMPDIR TEMP TEMPDIR TMP
-	mount /dev/pts -t devpts /srv/ltsp/dlw/dev/pts
-	mount proc -t proc /srv/ltsp/dlw/proc
-	if grep -q BD /etc/apt/sources.list && mountpoint -q /media/cdrom ; then
-		echo "deb [trusted=yes] $mirror $dist main" > /srv/ltsp/dlw/etc/apt/sources.list
-	fi
 	mkdir -p /srv/ltsp/dlw/tmp/user/0/
 	cp /usr/share/debian-edu-config/tools/debian-edu-bless /srv/ltsp/dlw/sbin
 
@@ -701,12 +702,11 @@ EOF
 	# Care for temporary mounts.
 	umount /srv/ltsp/dlw/dev/pts
 	umount /srv/ltsp/dlw/proc
-	if grep -q BD /etc/apt/sources.list && [ -f /media/cdrom/.disk/info ] ; then
+	if [ "true" == "$BD_ISO" ] ; then
 		umount /srv/ltsp/dlw/media/cdrom
-		umount /media/cdrom
 	fi
 
-	# Create optional SqashFS image file.
+	# Create optional SquashFS image file.
 	if [ "yes" == "$img"  ] ; then
 		ltsp image dlw
 	fi
@@ -800,3 +800,8 @@ fi
 sed -i "s#ltsp/ltsp.img#ltsp/${img}/ltsp.img#" /srv/tftp/ltsp/ltsp.ipxe
 # Add "quiet" and "splash" parameters to hide kernel logs on a boot screen.
 sed -i "s/set cmdline ${cmdline_method} ${cmdline_ltsp} ${cmdline_client}$/set cmdline ${cmdline_method} ${cmdline_ltsp} ${cmdline_client} ${KERNEL_PARAMETERS}/" /srv/tftp/ltsp/ltsp.ipxe
+
+# Unmount the BD image, if it was mounted at the start of this script.
+if [ "yes" == "$bd_iso_was_mounted" ] ; then
+	umount /media/cdrom
+fi



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/db78dc64799b3b70d6014a0ace36aca0fd6bf2f6...503dfd56fefc6d360f4a0b93053fab34c2238959

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/db78dc64799b3b70d6014a0ace36aca0fd6bf2f6...503dfd56fefc6d360f4a0b93053fab34c2238959
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20261014/6780b573/attachment-0001.htm>


More information about the debian-edu-commits mailing list