# HG changeset patch # User Raoul Bhatia [IPAX] <r.bha...@ipax.at> # Date 1278426578 -7200 # Branch stable-1.0 # Node ID 31401399d6334467296a60a13d0cea7641fc9358 # Parent 338113649a70f80fe89ac0765035a79f70cb202f suggested bashism fixes for HealthSMART OCF RA
diff -r 338113649a70 -r 31401399d633 extra/resources/HealthSMART --- a/extra/resources/HealthSMART Mon Jul 05 14:25:54 2010 +0200 +++ b/extra/resources/HealthSMART Tue Jul 06 16:29:38 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 _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker