diff options
author | Erich Eckner <git@eckner.net> | 2019-05-03 08:57:30 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-03 08:57:30 +0200 |
commit | fde41e125e648428954770d7fc95bacd61244ac1 (patch) | |
tree | e22c7f775d1c5b269d4f9b65017648b73324ae57 | |
parent | 0f2fdebf58a88324f384519f42e85c7c487a610b (diff) | |
download | check-kernel-fde41e125e648428954770d7fc95bacd61244ac1.tar.xz |
check-kernel: fix debian parsing
-rw-r--r-- | check-kernel.in | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/check-kernel.in b/check-kernel.in index 18c494a..c138152 100644 --- a/check-kernel.in +++ b/check-kernel.in @@ -76,12 +76,15 @@ elif which apt >/dev/null 2>&1; then uname -r ) installed=$( - dpkg-query -W 'linux-image-*' | \ - cut -f1 | \ - sed ' + dpkg-query -Wf'${Package} ${Status}\n' 'linux-image-*' | \ + sed -n ' s|^linux-image-|| + T + s/ install ok installed$// + T + p ' | \ - grep -x '\([0-9.]\+-\)\{2\}[^-]\+' | \ + grep -x '\([^-]\+-\)\{2\}[^-]\+' | \ sort -V | \ tail -n1 ) |