Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
pacemaker.32680
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.32680
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.5+20221208.a3f44794f/extra/resources/HealthSMART.in =================================================================== --- pacemaker-2.1.5+20221208.a3f44794f.orig/extra/resources/HealthSMART.in +++ pacemaker-2.1.5+20221208.a3f44794f/extra/resources/HealthSMART.in @@ -137,28 +137,30 @@ END check_temperature() { - if [ $1 -lt ${lower_red_limit} ] ; then - ocf_log info "Drive ${DRIVE} ${DEVICE} too cold: ${1} C" - attrd_updater -n "#health-smart" -B "red" -d "${OCF_RESKEY_dampen}" - return 1 - fi - - if [ $1 -gt ${upper_red_limit} ] ; then - ocf_log info "Drive ${DRIVE} ${DEVICE} too hot: ${1} C" - attrd_updater -n "#health-smart" -B "red" -d "${OCF_RESKEY_dampen}" - return 1 - fi - - if [ $1 -lt ${lower_yellow_limit} ] ; then - ocf_log info "Drive ${DRIVE} ${DEVICE} quite cold: ${1} C" - attrd_updater -n "#health-smart" -B "yellow" -d "${OCF_RESKEY_dampen}" - return 1 - fi - - if [ $1 -gt ${upper_yellow_limit} ] ; then - ocf_log info "Drive ${DRIVE} ${DEVICE} quite hot: ${1} C" - attrd_updater -n "#health-smart" -B "yellow" -d "${OCF_RESKEY_dampen}" - return 1 + if [ -n "$1" ]; then + if [ $1 -lt ${lower_red_limit} ] ; then + ocf_log info "Drive ${DRIVE} ${DEVICE} too cold: ${1} C" + attrd_updater -n "#health-smart" -B "red" -d "${OCF_RESKEY_dampen}" + return 1 + fi + + if [ $1 -gt ${upper_red_limit} ] ; then + ocf_log info "Drive ${DRIVE} ${DEVICE} too hot: ${1} C" + attrd_updater -n "#health-smart" -B "red" -d "${OCF_RESKEY_dampen}" + return 1 + fi + + if [ $1 -lt ${lower_yellow_limit} ] ; then + ocf_log info "Drive ${DRIVE} ${DEVICE} quite cold: ${1} C" + attrd_updater -n "#health-smart" -B "yellow" -d "${OCF_RESKEY_dampen}" + return 1 + fi + + if [ $1 -gt ${upper_yellow_limit} ] ; then + ocf_log info "Drive ${DRIVE} ${DEVICE} quite hot: ${1} C" + attrd_updater -n "#health-smart" -B "yellow" -d "${OCF_RESKEY_dampen}" + 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