summaryrefslogtreecommitdiffstats
path: root/hosts/codethink-sled12-arm64
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/codethink-sled12-arm64')
-rwxr-xr-xhosts/codethink-sled12-arm64/usr/local/bin/dsa-check-running-kernel12
1 files changed, 7 insertions, 5 deletions
diff --git a/hosts/codethink-sled12-arm64/usr/local/bin/dsa-check-running-kernel b/hosts/codethink-sled12-arm64/usr/local/bin/dsa-check-running-kernel
index 80f45bfb..aa6e35bd 100755
--- a/hosts/codethink-sled12-arm64/usr/local/bin/dsa-check-running-kernel
+++ b/hosts/codethink-sled12-arm64/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