[debian-edu-commits] [Git][debian-edu/debian-edu-config][personal/sunweaver/tjener-non-fqdn-hostname] 2 commits: testsuite/hostname: escape regex dot and exit non-zero on failure

Daniel Teichmann (@dzatoah) gitlab at salsa.debian.org
Fri Aug 21 19:22:47 BST 2026



Daniel Teichmann pushed to branch personal/sunweaver/tjener-non-fqdn-hostname at Debian Edu / debian-edu-config


Commits:
88aae95c by Daniel Teichmann at 2026-08-21T20:22:00+02:00
testsuite/hostname: escape regex dot and exit non-zero on failure

The unescaped dot in the 'tjener.intern' grep matched any character.
Escape it so the FQDN check is exact. Both error paths now exit 1 so a
broken hostname fails the test instead of silently passing.

- - - - -
06e2bd3d by Daniel Teichmann at 2026-08-21T20:22:41+02:00
share/debian-edu-config/d-i/pre-pkgsel: resolve leftover merge conflict

Commit 63442a25 committed a merge-conflict block around the
create_initial_localadmin_user() function. That function was removed
from master by 760801e3 (cruft cleanup, #1055648). Drop the conflict
markers and the cruft to match master.

- - - - -


2 changed files:

- share/debian-edu-config/d-i/pre-pkgsel
- testsuite/hostname


Changes:

=====================================
share/debian-edu-config/d-i/pre-pkgsel
=====================================
@@ -266,40 +266,6 @@ EOF
     fi
 }
 
-<<<<<<< HEAD
-=======
-create_initial_localadmin_user() {
-    LOCAL_USER_ID="localadmin"
-    LOCAL_USER_GECOS="Local Administrator"
-    LOCAL_USER_UIDNUMBER="1000"
-    LOCAL_USER_PRIMGIDNUMBER="1000"
-
-    LOCAL_USER_INGROUPS="$LOCAL_USER_INGROUPS adm sudo"
-
-    if db_get passwd/root-password-crypted && [ "$RET" ] ; then
-        log "No clear text root password, unable to use it for creating the initial local user"
-    else
-        # retrieve root password
-        db_get passwd/root-password
-        LOCAL_USER_PASSWD=$RET
-        # create initial local user
-        in-target /usr/sbin/addgroup --gid $LOCAL_USER_PRIMGIDNUMBER $LOCAL_USER_ID 1>&2 || true
-        in-target /usr/sbin/adduser --gid $LOCAL_USER_PRIMGIDNUMBER \
-                --firstuid $LOCAL_USER_UIDNUMBER \
-                --home /home/$LOCAL_USER_ID \
-                --shell /bin/bash \
-                --disabled-login \
-                --gecos "$LOCAL_USER_GECOS" $LOCAL_USER_ID 1>&2 || true
-        # add initial local user to some standard system groups
-        for group in ${LOCAL_USER_INGROUPS}; do
-                in-target /usr/sbin/adduser $LOCAL_USER_ID $group 1>&2 || true
-        done
-        # set password (batch mode)
-        in-target /bin/sh -c "echo ${LOCAL_USER_ID}:${LOCAL_USER_PASSWD} | /usr/sbin/chpasswd" 1>&2 || true
-    fi
-}
-
->>>>>>> ef7d92e9 (share/debian-edu-config/d-i/pre-pkgsel: white-space cleanup)
 # Work around grub bug #712907 (see also bug #763580) by preseeding
 # grub-installer/choose_device to the disk used by /target/boot
 # This fix it for the most common case.


=====================================
testsuite/hostname
=====================================
@@ -16,10 +16,12 @@ case $PROFILE in
     # Check that the hostname of the Main-Server is set to its short hostname (not FQDN)
     if [ -e /etc/hostname ] && grep -q -E "^tjener\$" /etc/hostname; then
         printf "success: %s: Main-Server's hostname is set to 'tjener'\n" "${scriptname}"
-    elif [ -e /etc/hostname ] && grep -q -E "^tjener.intern\$" /etc/hostname; then
+    elif [ -e /etc/hostname ] && grep -q -E "^tjener\.intern\$" /etc/hostname; then
         printf "error: %s: Main-Server's hostname is (still) set to 'tjener.intern', please drop the DNS domain part from it\n" "${scriptname}"
+        exit 1
     else
         printf "error: %s: Main-Server's hostname is not 'tjener'\n" "${scriptname}"
+        exit 1
     fi
     ;;
 esac



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/c618de32334de2731435b5440d092948c432c884...06e2bd3dd60cc14ce387c47cf8503696292003c0

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/c618de32334de2731435b5440d092948c432c884...06e2bd3dd60cc14ce387c47cf8503696292003c0
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/20260821/704767e1/attachment-0001.htm>


More information about the debian-edu-commits mailing list