No known key found for this signature in database
GPG Key ID: D910B384C7E3B5EC
2 changed files with
20 additions and
0 deletions
-
README.md
-
is-reboot-required.sh
|
|
@ -0,0 +1,6 @@ |
|
|
|
# Archlinux Stale Kernel Check |
|
|
|
|
|
|
|
This small script compares the running kernel version (`uname -r`) and the |
|
|
|
kernel version on the filesystem (`file /boot/vmlinuz-linux`). If the versions |
|
|
|
differ, it prints "Reboot required.". If not, it prints "No reboot required." |
|
|
|
|
|
|
@ -0,0 +1,14 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
set -euo pipefail |
|
|
|
IFS=$'\n\t' |
|
|
|
|
|
|
|
RUNNING_VERSION=$(uname -r) |
|
|
|
FS_VERSION=$(file /boot/vmlinuz-linux | sed -rn 's/.* version ([0-9\.A-Z-]+) .*/\1/p') |
|
|
|
|
|
|
|
if [ ! "${RUNNING_VERSION}" = ${FS_VERSION} ]; then |
|
|
|
echo "Reboot required." |
|
|
|
else |
|
|
|
echo "No reboot required." |
|
|
|
fi |
|
|
|
|