summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--check-kernel.in18
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 | \