summaryrefslogtreecommitdiffstats
path: root/hosts/profitbricks-build7-amd64/usr
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@debian.org>2017-05-21 15:26:28 +0200
committerHolger Levsen <holger@layer-acht.org>2017-05-21 19:46:45 +0200
commit3b848033295933b5af52b4cd88d09328d7a3cdfd (patch)
treebeeea435cbf2477a995c9f265a3674b0932d52fc /hosts/profitbricks-build7-amd64/usr
parentee64b8b9e1e57ec1c96a532711a3449680943516 (diff)
downloadjenkins.debian.net-3b848033295933b5af52b4cd88d09328d7a3cdfd.tar.xz
Update dsa-check-running-kernel from dsa-nagios (to support kernel 4.x as present in stretch)
Signed-off-by: Mattia Rizzolo <mattia@debian.org> Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'hosts/profitbricks-build7-amd64/usr')
-rwxr-xr-xhosts/profitbricks-build7-amd64/usr/local/bin/dsa-check-running-kernel12
1 files changed, 7 insertions, 5 deletions
diff --git a/hosts/profitbricks-build7-amd64/usr/local/bin/dsa-check-running-kernel b/hosts/profitbricks-build7-amd64/usr/local/bin/dsa-check-running-kernel
index 80f45bfb..aa6e35bd 100755
--- a/hosts/profitbricks-build7-amd64/usr/local/bin/dsa-check-running-kernel
+++ b/hosts/profitbricks-build7-amd64/usr/local/bin/dsa-check-running-kernel
@@ -57,12 +57,14 @@ get_avail() {
# DSA uses kernel versions of the form 2.6.29.3-dsa-dl380-oldxeon, where
# Debian uses versions of the form 2.6.29-2-amd64
- if [ "${kervers#3}" != "$kervers" ]; then
- metavers=$(echo $kervers | sed -r -e 's/^3\.[0-9]+(\.[0-9])?+-[A-Za-z0-9\.]+-(.*)/\2/')
- elif [ "${kervers//dsa}" != "$kervers" ]; then
- metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+([\.0-9]+?)-(.*)/2.\1-\3/')
+ if [ "${kervers#2}" != "$kervers" ]; then
+ if [ "${kervers//dsa}" != "$kervers" ]; then
+ metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+([\.0-9]+?)-(.*)/2.\1-\3/')
+ else
+ metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+-[A-Za-z0-9\.]+-(.*)/2.\1-\2/')
+ fi
else
- metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+-[A-Za-z0-9\.]+-(.*)/2.\1-\2/')
+ metavers=$(echo $kervers | sed -r -e 's/^[0-9]+\.[0-9]+(\.[0-9])?+-[A-Za-z0-9\.]+-(.*)/\2/')
fi
# Attempt to track back to a metapackage failed. bail