Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
pacemaker
pacemaker#3289-0001-Fix-HealthSmart-Check-the-p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker#3289-0001-Fix-HealthSmart-Check-the-parameter-values-of-check_.patch of Package pacemaker
From cccff82fef715b94d9b9c1f988e65c52184f1436 Mon Sep 17 00:00:00 2001 From: bixiaoyan1 <bixiaoyan@kylinos.cn> Date: Tue, 12 Dec 2023 14:15:32 +0800 Subject: [PATCH] Fix: HealthSmart: Check the parameter values of check_temperature to avoid error output --- extra/resources/HealthSMART.in | 40 ++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) Index: pacemaker-2.1.2+20211124.ada5c3b36/extra/resources/HealthSMART.in =================================================================== --- pacemaker-2.1.2+20211124.ada5c3b36.orig/extra/resources/HealthSMART.in +++ pacemaker-2.1.2+20211124.ada5c3b36/extra/resources/HealthSMART.in @@ -118,28 +118,30 @@ END check_temperature() { - if [ $1 -lt ${lower_red_limit} ] ; then - ocf_log info "Drive ${DRIVE} ${DEVICE} too cold: ${1} C" - "$ATTRDUP" -n "#health-smart" -B "red" -d "5s" - return 1 - fi - - if [ $1 -gt ${upper_red_limit} ] ; then - ocf_log info "Drive ${DRIVE} ${DEVICE} too hot: ${1} C" - "$ATTRDUP" -n "#health-smart" -B "red" -d "5s" - return 1 - fi - - if [ $1 -lt ${lower_yellow_limit} ] ; then - ocf_log info "Drive ${DRIVE} ${DEVICE} quite cold: ${1} C" - "$ATTRDUP" -n "#health-smart" -B "yellow" -d "5s" - return 1 - fi - - if [ $1 -gt ${upper_yellow_limit} ] ; then - ocf_log info "Drive ${DRIVE} ${DEVICE} quite hot: ${1} C" - "$ATTRDUP" -n "#health-smart" -B "yellow" -d "5s" - return 1 + if [ -n "$1" ]; then + if [ $1 -lt ${lower_red_limit} ] ; then + ocf_log info "Drive ${DRIVE} ${DEVICE} too cold: ${1} C" + "$ATTRDUP" -n "#health-smart" -B "red" -d "5s" + return 1 + fi + + if [ $1 -gt ${upper_red_limit} ] ; then + ocf_log info "Drive ${DRIVE} ${DEVICE} too hot: ${1} C" + "$ATTRDUP" -n "#health-smart" -B "red" -d "5s" + return 1 + fi + + if [ $1 -lt ${lower_yellow_limit} ] ; then + ocf_log info "Drive ${DRIVE} ${DEVICE} quite cold: ${1} C" + "$ATTRDUP" -n "#health-smart" -B "yellow" -d "5s" + return 1 + fi + + if [ $1 -gt ${upper_yellow_limit} ] ; then + ocf_log info "Drive ${DRIVE} ${DEVICE} quite hot: ${1} C" + "$ATTRDUP" -n "#health-smart" -B "yellow" -d "5s" + return 1 + fi fi }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor