Check Reboot required

Script: check_reboot_required

Check if a reboot is required. It works for Centos and Debian/ Ubuntu.

If the reboot is required:

  • On Centos it shows the kernel number that will be installed,
  • On Debian/ Ubuntu it shows the packages that require the reboot,

Standalone installation

From this repository ypu need next to this script:

  • inc_pluginfunctions shared function for all IML checks written in bash

Syntax

$ check_reboot_required [-h]

Parameters

OPTIONS:

    -h or --help   show this help.

PARAMETERS:

    None

Examples

No reboot needed

./check_reboot_required 
OK: [centos] no reboot required (kernel is up to date: 4.18.0-500.el8.x86_64)

Reboot needed

On CentOs we check an updated kernel

./check_reboot_required 
WARNING: [centos] need to reboot for kernel package   kernel is not installed (current: 4.18.0-193.el8.x86_64)

Not supported OS: unknown

./check_reboot_required
UNKNOWN: distro [manjaro] was detected but is not supported (yet).