[Qa-jenkins-scm] [jenkins.debian.net] 01/01: make dsa-check-running-kernel work with changes in Ubuntu LTS. WIP, not yet deployed to all the other hosts

Holger Levsen holger at layer-acht.org
Wed Dec 20 12:19:16 UTC 2017


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

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit dd9b53057324b65dfdd1a63a117342389b48bc53
Author: Holger Levsen <holger at layer-acht.org>
Date:   Wed Dec 20 12:19:10 2017 +0000

    make dsa-check-running-kernel work with changes in Ubuntu LTS. WIP, not yet deployed to all the other hosts
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 .../usr/local/bin/dsa-check-running-kernel                   | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/hosts/codethink-sled9-arm64/usr/local/bin/dsa-check-running-kernel b/hosts/codethink-sled9-arm64/usr/local/bin/dsa-check-running-kernel
index aa6e35b..6eaa514 100755
--- a/hosts/codethink-sled9-arm64/usr/local/bin/dsa-check-running-kernel
+++ b/hosts/codethink-sled9-arm64/usr/local/bin/dsa-check-running-kernel
@@ -201,8 +201,13 @@ for on_disk in \
 			fi
 			[ -z "$on_disk_version" ] || break
 			on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
+			if [ -x /usr/bin/lsb_release ] ; then
+				vendor=$(lsb_release -i -s)
+				if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
+					on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
+				fi
+			fi
 			[ -z "$on_disk_version" ] || break
-
 			echo "UNKNOWN: Failed to get a version string from image $on_disk"
 			exit $UNKNOWN
 		else
@@ -225,7 +230,10 @@ if [ "$(uname -s)" = "Linux" ]; then
 	fi
 
 	if [ "$running_version" != "$on_disk_version" ]; then
-		echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
+		echo "WARNING: Running kernel does not match on-disk kernel image:"
+		echo "  $running_version"
+		echo "!="
+		echo "  $on_disk_version"
 		exit $WARNING
 	fi
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list