[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] 3 commits: sbin/debian-edu-ltsp-install: Mark DLW / TC chroots as successfully created...

Mike Gabriel (@sunweaver) gitlab at salsa.debian.org
Sun Nov 8 20:49:33 GMT 2026



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


Commits:
2a230b21 by Mike Gabriel at 2026-11-08T21:15:29+01:00
sbin/debian-edu-ltsp-install: Mark DLW / TC chroots as successfully created once the package installation is complete

- - - - -
52848146 by Mike Gabriel at 2026-11-08T21:45:53+01:00
share/debian-edu-config/{d-i/finish-install,tools/run-at-first-boot: Move X2Go ThinClient creation into run-at-firstboot script (if LTSP-Server profile gets installed)

To ensure success of the X2Go ThinClient creation, check wether the
installation has been successful at previous boots. If not, try to start
from scratch. (See: #1153430).

(Closes: #1153431).

- - - - -
31219488 by Mike Gabriel at 2026-11-08T21:49:26+01:00
run-at-firstboot: Re-try DLW chroot creation if previous attempt was not successful

This can, for example, happen if the server got rebooted to quickly
after the first boot, although the DLW chroot creation had not finished.

(Closes: #1153430).

- - - - -


3 changed files:

- sbin/debian-edu-ltsp-install
- share/debian-edu-config/d-i/finish-install
- share/debian-edu-config/tools/run-at-firstboot


Changes:

=====================================
sbin/debian-edu-ltsp-install
=====================================
@@ -563,6 +563,9 @@ debootstrap --arch="$arch" --no-check-gpg --variant=minbase --include=sitesummar
 EOF
 	fi
 
+	# Mark the chroot as successfully created.
+	touch /srv/ltsp/x2go-"$thin_type"-"$arch"/CREATED_SUCCESSFULLY_$(date +%Y%m%d-%H%M)
+
 	if [ "$img" == "yes" ] ; then
 		ltsp image /srv/ltsp/x2go-"$thin_type"-"$arch"
 	fi
@@ -706,6 +709,9 @@ EOF
 		umount /srv/ltsp/dlw/media/cdrom
 	fi
 
+	# Mark the chroot as successfully created.
+	touch /srv/ltsp/dlw/CREATED_SUCCESSFULLY_$(date +%Y%m%d-%H%M)
+
 	# Create optional SquashFS image file.
 	if [ "yes" == "$img"  ] ; then
 		ltsp image dlw


=====================================
share/debian-edu-config/d-i/finish-install
=====================================
@@ -64,18 +64,6 @@ fi
 db_get debian-edu-install/profile
 PROFILE="$RET"
 
-# Create LTSP thin client image and iPXE setup in case of a combined server.
-if echo "$PROFILE" | grep -Eq 'Main-Server.*LTSP-Server' ; then
-	in-target /bin/sh -c "modprobe squashfs" || true
-	in-target /bin/sh -c "modprobe loop" || true
-	in-target /bin/sh -c "modprobe overlay" || true
-	if in-target /bin/sh -c "/usr/sbin/debian-edu-ltsp-install --diskless_workstation no --thin_type bare" ; then
-		log "info: Running 'debian-edu-ltsp-install' succeeded"
-	else
-		log "error: 'debian-edu-ltsp-install' failed"
-	fi
-fi
-
 # Register changes before and after cf-agent is executed, to make it
 # easier to track our changes
 edu-etcvcs commit


=====================================
share/debian-edu-config/tools/run-at-firstboot
=====================================
@@ -75,7 +75,10 @@ if ! is_ltsp_client; then
 	# Diskless Workstation chroot from scratch as clean environment.
 	if echo "$PROFILE" | grep -Eq 'Main-Server' && \
 	   echo "$PROFILE" | grep -Eq 'LTSP-Server'; then
-		if [ ! -d /srv/ltsp/dlw ]; then
+		if [ -d /srv/ltsp/dlw ] && [ -z "$(find /srv/ltsp/dlw/ -name "SUCCESSFULLY_CREATED_*")" ]; then
+			rm -Rf /srv/ltsp/dlw
+		fi
+		if [ -n "$(find /srv/ltsp/dlw/ -name "SUCCESSFULLY_CREATED_*")" ]; then
 			/usr/sbin/debian-edu-ltsp-install --dlw yes
 		fi
 	# else if this runs on a pure LTSP-Server (no Main-Server role), then
@@ -87,6 +90,15 @@ if ! is_ltsp_client; then
 			/usr/sbin/debian-edu-ltsp-install --diskless_workstation yes
 		fi
 	fi
+	# Always create the thin client image for all LTSP-Server variants/combinations.
+	if echo "$PROFILE" | grep -Eq 'LTSP-Server'; then
+		if [ -d /srv/ltsp/x2go-bare-amd64/ ] && [ -z "$(find /srv/ltsp/x2go-bare-amd64/ -name "SUCCESSFULLY_CREATED_*")" ]; then
+			rm -Rf /srv/ltsp/x2go-bare-amd64/
+		fi
+		if [ -n "$(find /srv/ltsp/x2go-bare-amd64/ -name "SUCCESSFULLY_CREATED_*")" ]; then
+			/usr/sbin/debian-edu-ltsp-install --thin_type bare
+		fi
+	fi
 fi
 
 # Update PXE setup on LTSP servers with proxy values set in environment



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/b9a55a64cbdab3a666cdb246c1564a1039de9f08...312194885bf828663ebd1f0df706e7cc453a7144

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/b9a55a64cbdab3a666cdb246c1564a1039de9f08...312194885bf828663ebd1f0df706e7cc453a7144
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/20261108/6a859206/attachment-0001.htm>


More information about the debian-edu-commits mailing list