minor fix in 'systemkit cpuload'

parent eb8eb44d
......@@ -37,9 +37,13 @@ case ${1} in
[[ ! "${cpu#.}x" = "${cpu}x" ]] && cpu="0${cpu}"
cpu=${cpu%%.*}
[[ $cpu -gt 100 ]] && cpu=100
[[ $cpu -lt 10 ]] && prepend=00
[[ $cpu -lt 100 ]] && prepend=0
if [[ $cpu -gt 100 ]]; then
cpu=100
elif [[ $cpu -lt 10 ]]; then
prepend=00
elif [[ $cpu -lt 100 ]]; then
prepend=0
fi
echo ${prepend}${cpu}
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment