From fde41e125e648428954770d7fc95bacd61244ac1 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 3 May 2019 08:57:30 +0200 Subject: check-kernel: fix debian parsing --- check-kernel.in | 11 +++++++---- 1 file 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 ) -- cgit v1.2.3-70-g09d2