[debian-edu-commits] debian-edu/ 03/04: Extend LTSP chroot installation check to work with both amd64 and i386 archs.

Wolfgang Schweer schweer-guest at moszumanska.debian.org
Sun Jan 28 15:24:38 UTC 2018


This is an automated email from the git hooks/post-receive script.

schweer-guest pushed a commit to branch master
in repository debian-edu-config.

commit 0df5b14eb988fb5c94dd811680f5693f2a684211
Author: Wolfgang Schweer <wschweer at arcor.de>
Date:   Sun Jan 28 14:04:35 2018 +0100

    Extend LTSP chroot installation check to work with both amd64 and i386 archs.
---
 testsuite/ltsp | 168 ++++++++++++++++++++++++++++-----------------------------
 1 file changed, 84 insertions(+), 84 deletions(-)

diff --git a/testsuite/ltsp b/testsuite/ltsp
index 1e35be8..0a9b733 100755
--- a/testsuite/ltsp
+++ b/testsuite/ltsp
@@ -1,8 +1,6 @@
 #!/bin/sh
 #
-# Check the LTSP installation.
-
-LTSPARCH=`ltsp-arch-debian-edu`
+# Check LTSP chroot installation (if amd64, i386 or even both archs are available).
 
 PROFILE=
 if test -r /etc/debian-edu/config ; then
@@ -17,94 +15,96 @@ error() {
     echo "error: $0: $*"
 }
 
-if echo "$PROFILE" | grep -q LTSP-Server ; then
-    chroot="/opt/ltsp/$LTSPARCH"
-    if [ -f $chroot/etc/lts.conf ] ; then
-	success "Found LTSP chroot"
-    else
-	error "LTSP chroot is missing in $chroot/"
-    fi
+for LTSPARCH in amd64 i386 ; do
+    if echo "$PROFILE" | grep -q LTSP-Server && [ -e /opt/ltsp/images/$LTSPARCH.img ]; then
+        chroot="/opt/ltsp/$LTSPARCH"
+        if [ -f $chroot/etc/lts.conf ] ; then
+	    success "Found LTSP $LTSPARCH chroot"
+        else
+	    error "LTSP $LTSPARCH chroot is missing in $chroot/"
+        fi
 
-    # Verify that the wanted packages are installed, first thin clients
-    for pkg in $(tasksel --task-packages education-thin-client | sort) ; do
-	if chroot $chroot dpkg -l $pkg > /dev/null 2>&1 ; then
-	    success "package $pkg is installed in LTSP chroot"
-	else
-	    error "package $pkg is not installed in LTSP chroot"
-	fi
-    done
+        # Verify that the wanted packages are installed, first thin clients
+        for pkg in $(tasksel --task-packages education-thin-client | sort) ; do
+	    if chroot $chroot dpkg -l $pkg > /dev/null 2>&1 ; then
+	        success "package $pkg is installed in LTSP $LTSPARCH chroot"
+	    else
+	        error "package $pkg is not installed in LTSP $LTSPARCH chroot"
+	    fi
+        done
 
-    # and then diskless workstation
-    for pkg in education-workstation ; do
-	if chroot $chroot dpkg -l $pkg > /dev/null 2>&1 ; then
-	    success "package $pkg is installed in LTSP chroot"
-	else
-	    error "package $pkg is not installed in LTSP chroot"
-	fi
-    done
+        # and then diskless workstation
+        for pkg in education-workstation ; do
+	    if chroot $chroot dpkg -l $pkg > /dev/null 2>&1 ; then
+	        success "package $pkg is installed in LTSP $LTSPARCH chroot"
+	    else
+	        error "package $pkg is not installed in LTSP $LTSPARCH chroot"
+	    fi
+        done
 
-    # Ensure the profile file exist and is properly set for a diskless
-    # workstation
-    if [ -f $chroot/etc/debian-edu/config ] ; then
-        ( # In a subshell to avoid keeping the values in this script
-            . $chroot/etc/debian-edu/config
-            if [ Workstation != "$PROFILE" ] ; then
-                error "Missing PROFILE=Workstation in $chroot/etc/debian-edu/config."
-            else
-		success "PROFILE=Workstation is set in $chroot/etc/debian-edu/config."
-            fi
-        )
-    else
-        error "Missing $chroot/etc/debian-edu/config"
-    fi
+        # Ensure the profile file exist and is properly set for a diskless
+        # workstation
+        if [ -f $chroot/etc/debian-edu/config ] ; then
+            ( # In a subshell to avoid keeping the values in this script
+                . $chroot/etc/debian-edu/config
+                if [ Workstation != "$PROFILE" ] ; then
+                    error "Missing PROFILE=Workstation in $chroot/etc/debian-edu/config."
+                else
+		    success "PROFILE=Workstation is set in $chroot/etc/debian-edu/config."
+                fi
+            )
+        else
+            error "Missing $chroot/etc/debian-edu/config"
+        fi
 
-    for path in /etc/ldap/ssl/ldap-server-pubkey.pem ; do
-	if cmp -s $path  $chroot$path ; then
-	    success "$path is identical inside and outside LTSP"
-	else
-	    error "$path is different inside and outside LTSP"
-	fi
-    done
+        for path in /etc/ldap/ssl/ldap-server-pubkey.pem ; do
+	    if cmp -s $path  $chroot$path ; then
+	        success "$path is identical inside and outside LTSP $LTSPARCH"
+	    else
+	        error "$path is different inside and outside LTSP $LTSPARCH"
+	    fi
+        done
 
-    # Need to cat the file in the chroot to chech the current content,
-    # in case resolvconf converted resolv.conf into a symlink.
-    # The resolv.conf files should be identical to make sure apt can
-    # look up DNS entries and upgrade packages in the chroot.
-    if chroot /opt/ltsp/i386 cat /etc/resolv.conf | cmp -s /etc/resolv.conf ; then
-	success "resolv.conf is identical inside and outside LTSP"
-    else
-	error "resolv.conf differ inside and outside LTSP"
-    fi
+        # Need to cat the file in the chroot to chech the current content,
+        # in case resolvconf converted resolv.conf into a symlink.
+        # The resolv.conf files should be identical to make sure apt can
+        # look up DNS entries and upgrade packages in the chroot.
+        if chroot /opt/ltsp/$LTSPARCH cat /etc/resolv.conf | cmp -s /etc/resolv.conf ; then
+	    success "resolv.conf is identical inside and outside LTSP $LTSPARCH"
+        else
+	    error "resolv.conf differ inside and outside LTSP $LTSPARCH"
+        fi
 
-    # Verify that IP-forwarding is enabled by init.d/enable-nat
-    if [ 1 = "`cat /proc/sys/net/ipv4/ip_forward`" ]; then
-	success "IPv4 forwarding is enabled"
-    else
-	error "IPv4 forwarding is not enabled"
-    fi
+        # Verify that IP-forwarding is enabled by init.d/enable-nat
+        if [ 1 = "`cat /proc/sys/net/ipv4/ip_forward`" ]; then
+	    success "IPv4 forwarding is enabled"
+        else
+	    error "IPv4 forwarding is not enabled"
+        fi
 
-    # Verify that the default LTSP configuration is available in LDAP
-    if ldapsearch -x "(&(ltspConfig=*)(cn=ltspConfigDefault))" > /dev/null 2>&1
-    then
-	echo "success: $0: found LTSP default settings in LDAP"
-    else
-	echo "error: $0: LTSP default settings are missing in LDAP"
-    fi
+        # Verify that the default LTSP configuration is available in LDAP
+        if ldapsearch -x "(&(ltspConfig=*)(cn=ltspConfigDefault))" > /dev/null 2>&1
+        then
+	    echo "success: $0: found LTSP default settings in LDAP"
+        else
+	    echo "error: $0: LTSP default settings are missing in LDAP"
+        fi
 
-    # Verify that the default LTSP configuration is available in LDAP.
-    # Bug somewhere caused it to only accept connections from
-    # localhost.
-    if nc "$(uname -n)" 9571 | grep -q ^session: ; then
-	echo "success: $0: able to connect to ldinfod"
-    else
-	echo "error: $0: not able to connect to ldinfod"
-    fi
+        # Verify that the default LTSP configuration is available in LDAP.
+        # Bug somewhere caused it to only accept connections from
+        # localhost.
+        if nc "$(uname -n)" 9571 | grep -q ^session: ; then
+	    echo "success: $0: able to connect to ldinfod"
+        else
+	    echo "error: $0: not able to connect to ldinfod"
+        fi
 
-    # Test if NBD is configured for LTSP chroot.
-    if [ -e /opt/ltsp/images/$LTSPARCH.img ] \
-        && [ -f /etc/nbd-server/conf.d/ltsp_$LTSPARCH.conf ] ; then
-        echo "success: $0: NBD image and configuration for LTSP exists"
-    else
-        echo "error: $0: NBD configuration for LTSP is broken"
+        # Test if NBD is configured for LTSP $LTSPARCH chroot.
+        if [ -e /opt/ltsp/images/$LTSPARCH.img ] \
+            && [ -f /etc/nbd-server/conf.d/ltsp_$LTSPARCH.conf ] ; then
+            echo "success: $0: found NBD image and configuration for LTSP $LTSPARCH"
+        else
+            echo "error: $0: NBD configuration for LTSP $LTSPARCH is broken"
+        fi
     fi
-fi
+done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list