[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] 2 commits: share/debian-edu-config/tools/run-at-firstboot: Add an environment check to...
Mike Gabriel (@sunweaver)
gitlab at salsa.debian.org
Fri Sep 4 22:24:09 BST 2026
Mike Gabriel pushed to branch master at Debian Edu / debian-edu-config
Commits:
c2ba0299 by Serhii Horichenko at 2026-09-04T19:26:12+02:00
share/debian-edu-config/tools/run-at-firstboot: Add an environment check to avoid starting the image creation on an LTSP-client (Closes: #1092123).
- - - - -
8b5765b6 by Serhii Horichenko at 2026-09-04T19:40:06+02:00
share/debian-edu-config/tools/run-at-firstboot: Add an ability to create a Diskless Workstation chroot and separate the creation of an image on an LTSP-server without the Main-Server role (Closes: #1092123).
- - - - -
1 changed file:
- share/debian-edu-config/tools/run-at-firstboot
Changes:
=====================================
share/debian-edu-config/tools/run-at-firstboot
=====================================
@@ -26,6 +26,14 @@ at_exit() {
error "script $0 terminated unexpectedly."
}
disable_exception() { trap - INT TERM EXIT; }
+is_ltsp_client() {
+ if grep -q "initrd=ltsp.img" < /proc/cmdline; then
+ return 0
+ else
+ return 1
+ fi
+}
+
trap at_exit INT TERM EXIT
info "Executing run-at-firstboot script."
@@ -62,9 +70,23 @@ fi
# information from some daemons isn't available during installation. It's done
# for a combined server but not for a separate LTSP server because the image
# needs to include the krb5.keytab file which isn't available at this time.
-if echo "$PROFILE" | grep -Eq 'Main-Server.*LTSP-Server' && \
- [ ! -f /srv/ltsp/images/$ltspimg ] ; then
- /usr/sbin/debian-edu-ltsp-install --diskless_workstation yes
+if ! is_ltsp_client; then
+ # If this runs on a combi server (Main-Server + LTSP-Server), create
+ # 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
+ /usr/sbin/debian-edu-ltsp-install --dlw yes
+ fi
+ # else if this runs on a pure LTSP-Server (no Main-Server role), then
+ # let's use the file system of the LTSP-Server and generate the LTSP
+ # image directly from it (faster!).
+ elif echo "$PROFILE" | grep -Eqv 'Main-Server' && \
+ echo "$PROFILE" | grep -Eq 'LTSP-Server'; then
+ if [ ! -f /srv/ltsp/images/$ltspimg ] ; then
+ /usr/sbin/debian-edu-ltsp-install --diskless_workstation yes
+ 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/3ae89a7ccbf0db5e7c5a29a3475c6f40c80d5d46...8b5765b6a7de1f3ecda1c35e4027612391c008f8
--
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/3ae89a7ccbf0db5e7c5a29a3475c6f40c80d5d46...8b5765b6a7de1f3ecda1c35e4027612391c008f8
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/20260904/d16af6eb/attachment-0001.htm>
More information about the debian-edu-commits
mailing list