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