[Pacemaker] [PATCH] suggested bashism fixes
Raoul Bhatia [IPAX]
r.bhatia at ipax.at
Tue Jul 6 14:15:53 UTC 2010
# HG changeset patch
# User Raoul Bhatia [IPAX] <r.bhatia at ipax.at>
# Date 1278425714 -7200
# Branch stable-1.0
# Node ID b914d11e1e165fc0b559ebbfb70db0014da0c250
# Parent 338113649a70f80fe89ac0765035a79f70cb202f
suggested bashism fixes
diff -r 338113649a70 -r b914d11e1e16 extra/resources/HealthSMART
--- a/extra/resources/HealthSMART Mon Jul 05 14:25:54 2010 +0200
+++ b/extra/resources/HealthSMART Tue Jul 06 16:15:14 2010 +0200
@@ -116,7 +116,7 @@
lower_yellow_limit=5
else
lower_red_limit=${OCF_RESKEY_temp_lower_limit}
- let lower_yellow_limit=${OCF_RESKEY_temp_lower_limit}+5
+ lower_yellow_limit=$(({OCF_RESKEY_temp_lower_limit}+5))
fi
if [ "x${OCF_RESKEY_temp_upper_limit}" = "x" ] ; then
@@ -124,7 +124,7 @@
upper_yellow_limit=55
else
upper_red_limit=${OCF_RESKEY_temp_upper_limit}
- let upper_yellow_limit=${OCF_RESKEY_temp_upper_limit}-5
+ upper_yellow_limit=$(({OCF_RESKEY_temp_upper_limit}-5))
fi
if [ "x${OCF_RESKEY_drives}" = "x" ] ; then
@@ -195,25 +195,25 @@
#
TEMP=`$SMARTCTL -A /dev/sda | awk '/^194/ { print $10 }'`
echo "Temp = "$TEMP
- if [[ ${TEMP} -lt ${lower_red_limit} ]] ; then
+ if [ ${TEMP} -lt ${lower_red_limit} ] ; then
ocf_log info "Drive /dev/sda too cold."
attrd_updater -n "#health-smart" -U "red" -d "5s"
return $OCF_SUCCESS
fi
- if [[ $TEMP -gt ${upper_red_limit} ]] ; then
+ if [ $TEMP -gt ${upper_red_limit} ] ; then
ocf_log info "Drive /dev/sda too hot."
attrd_updater -n "#health-smart" -U "red" -d "5s"
return $OCF_SUCCESS
fi
- if [[ $TEMP -lt ${lower_yellow_limit} ]] ; then
+ if [ $TEMP -lt ${lower_yellow_limit} ] ; then
ocf_log info "Drive /dev/sda quite cold."
attrd_updater -n "#health-smart" -U "yellow" -d "5s"
return $OCF_SUCCESS
fi
- if [[ $TEMP -gt ${upper_yellow_limit} ]] ; then
+ if [ $TEMP -gt ${upper_yellow_limit} ] ; then
ocf_log info "Drive /dev/sda quite hot."
attrd_updater -n "#health-smart" -U "yellow" -d "5s"
return $OCF_SUCCESS
More information about the Pacemaker
mailing list