File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -713,13 +713,23 @@ get_repos() {
713713}
714714
715715reboot_required () {
716- # On debian-based clients, the update-notifier-common
717- # package needs to be installed for this to work.
716+ # Debian/Ubuntu: update-notifier-common sets this file
718717 if [ -e /var/run/reboot-required ] ; then
719718 reboot=True
720- else
721- reboot=ServerCheck
719+ return
720+ fi
721+
722+ # Compare running vs installed kernel via /boot/vmlinuz symlink
723+ if [ -e /proc/sys/kernel/osrelease ] && [ -L /boot/vmlinuz ] ; then
724+ running_kernel=$( cat /proc/sys/kernel/osrelease)
725+ installed_kernel=$( readlink /boot/vmlinuz | sed -e ' s/^vmlinuz-//' )
726+ if [ " ${running_kernel} " != " ${installed_kernel} " ] ; then
727+ reboot=True
728+ return
729+ fi
722730 fi
731+
732+ reboot=ServerCheck
723733}
724734
725735build_packages_json () {
You can’t perform that action at this time.
0 commit comments