first commit

This commit is contained in:
Yavuz Aydın 2021-01-07 16:50:36 +01:00
parent 1c34e9715f
commit 68d6992ae1
1 changed files with 3 additions and 2 deletions

View File

@ -122,12 +122,13 @@ function check_redhat() {
check_running_kernel
fi
output_clean=$(needs-restarting -r | xargs)
output=$(needs-restarting -r | xargs)
if [ $? -eq 0 ]; then
echo "No reboot required: ${output}"
echo "No reboot required: ${output_clean}"
exit ${OK_EXIT_CODE}
elif [ $? -eq 1 ]; then
EXIT_MSG_BODY="${output}"
EXIT_MSG_BODY="${output_clean}"
if [ "${warn_only}" == "true" ]; then
EXIT_MSG=${WARNING_MSG}
EXIT_CODE=${WARNING_EXIT_CODE}