-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathreboot_required_linux.sh
More file actions
34 lines (29 loc) · 1.01 KB
/
reboot_required_linux.sh
File metadata and controls
34 lines (29 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Run our OS tests, export OS_RELEASE
source "${PT__installdir}/patching/files/bash/os_test.sh"
# default
export REBOOT_REQUIRED="false"
case $OS_RELEASE in
################################################################################
RHEL | CENTOS | FEDORA | ROCKY | OL | ALMALINUX | PHOTON)
# RedHat variant
source "${PT__installdir}/patching/files/bash/reboot_required_rh.sh"
;;
################################################################################
DEBIAN | UBUNTU)
# Debian variant
source "${PT__installdir}/patching/files/bash/reboot_required_deb.sh"
;;
################################################################################
SLES)
# SUSE variant
source "${PT__installdir}/patching/files/bash/reboot_required_sles.sh"
;;
################################################################################
*)
echo "ERROR - Unknown Operating System: ${OS_RELEASE}"
exit 2
;;
esac
echo "{\"reboot_required\": ${REBOOT_REQUIRED} }"
exit 0