diff options
Diffstat (limited to 'check-kernel')
-rwxr-xr-x | check-kernel | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/check-kernel b/check-kernel deleted file mode 100755 index 5370f49..0000000 --- a/check-kernel +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -if which pacman >/dev/null 2>&1; then - # arch linux - running=$( - uname -r | \ - sed ' - s|-ARCH$|| - ' - ) - installed=$( - pacman -Q linux | \ - cut -d' ' -f2 - ) -elif which apt >/dev/null 2>&1; then - # debian - running=$( - uname -r - ) - installed=$( - dpkg-query -W 'linux-image-*-?86' | \ - cut -f1 | \ - sed ' - s|^linux-image-|| - ' | \ - sort -V | \ - tail -n1 - ) -else - >&2 printf 'Cannot determin installed kernel.\n' - exit 2 -fi - -if [ "${running}" = "${installed}" ]; then - >&2 printf 'The installed kernel (%s) is currently running.\n' \ - "${installed}" - exit 0 -else - >&2 printf 'The installed (%s) and running kernel (%s) differ.\n' \ - "${installed}" \ - "${running}" - exit 1 -fi |