Better updates
This commit is contained in:
21
install.sh
21
install.sh
@@ -219,4 +219,23 @@ case "$response" in
|
||||
*)
|
||||
echo "Reboot skipped. Please reboot when convenient."
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
# Check whether the running kernel matches the installed modules — if not, a
|
||||
# newer kernel was installed during this run and a reboot is required
|
||||
if ! ls /usr/lib/modules/$(uname -r) > /dev/null 2>&1; then
|
||||
echo "A newer kernel has been installed, a reboot is recommended."
|
||||
read -rp "Reboot now? [y/N] " response
|
||||
case "$response" in
|
||||
[yY][eE][sS]|[yY])
|
||||
echo "Rebooting..."
|
||||
sudo reboot
|
||||
;;
|
||||
*)
|
||||
echo "Reboot skipped. Please remember to reboot when convenient."
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "Kernel is up to date, no reboot needed. You may want to consider a reboot if other significant software was updated or installed."
|
||||
fi
|
||||
Reference in New Issue
Block a user