diff options
Diffstat (limited to 'check-kernel.in')
-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 ) |