diff options
author | Erich Eckner <git@eckner.net> | 2019-11-05 05:58:37 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-11-05 05:58:37 +0100 |
commit | 16d60905a67ad0b5d037caeeefee3e701832cfd4 (patch) | |
tree | 052d04facc864691a23ca1ae53e900ca67600686 | |
parent | b95f1c02855431413c2662cace2aa49cdc8f4c9b (diff) | |
download | check-kernel-16d60905a67ad0b5d037caeeefee3e701832cfd4.tar.xz |
pacman macht noch kein Arch!
-rw-r--r-- | check-kernel.in | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/check-kernel.in b/check-kernel.in index 7a6500c..2dd5e15 100644 --- a/check-kernel.in +++ b/check-kernel.in @@ -54,7 +54,23 @@ if [ -f '#ETCDIR#/check-kernel.conf' ]; then fi unset installed -if which pacman >/dev/null 2>&1; then +if command -v pkgrm >/dev/null \ +&& command -v pkgadd >/dev/null \ +&& [ -d /etc/ports ]; then + running=$( + uname -r + ) + installed=$( + ls /boot | \ + sed -n ' + s/^vmlinuz-\([0-9.]\+\)$/\1/ + T + p + ' | \ + sort -V | \ + tail -n1 + ) +elif which pacman >/dev/null 2>&1; then # arch linux running=$( uname -r | \ |