You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/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/pi')
|
|
|
|
if [ ! "${RUNNING_VERSION}" = ${FS_VERSION} ]; then
|
|
echo "Reboot required."
|
|
else
|
|
echo "No reboot required."
|
|
fi
|
|
|