!97 Fix syntax errors
From: @yaokai13 Reviewed-by: @miao_kaibo Signed-off-by: @miao_kaibo
This commit is contained in:
commit
6795c8e392
@ -22,7 +22,7 @@ swap_total=$(cat /proc/meminfo | awk '/^SwapTotal:/ { printf($2)}')
|
||||
swap_free=$(cat /proc/meminfo | awk '/^SwapFree:/ { printf($2)}')
|
||||
|
||||
|
||||
if [ $memory_total -gt 0 ]
|
||||
if [[ $memory_total -gt 0 ]]
|
||||
then
|
||||
memory_usage=`echo "scale=1; ($memory_total - $memory_free - $buffers - $cached - $sreclaimable) * 100.0 / $memory_total" |bc`
|
||||
memory_usage="${memory_usage}%"
|
||||
@ -31,7 +31,7 @@ else
|
||||
fi
|
||||
|
||||
# Swap memory
|
||||
if [ $swap_total -gt 0 ]
|
||||
if [[ $swap_total -gt 0 ]]
|
||||
then
|
||||
swap_mem=`echo "scale=1; ($swap_total - $swap_free) * 100.0 / $swap_total" |bc`
|
||||
swap_mem="${swap_mem}%"
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
%define dist_release_version 8
|
||||
%define generic_version 20.03
|
||||
%define generic_patch_level LTS
|
||||
%define generic_release 48
|
||||
%define generic_release 49
|
||||
%define builtin_release_version 1.0
|
||||
|
||||
%define current_arch %{_arch}
|
||||
@ -136,6 +136,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/etc/profile.d/performance.sh
|
||||
|
||||
%changelog
|
||||
* Wed Dec 01 2021 yaokai <yaokai13@huawei.com> - 1.0.49
|
||||
- Fix syntax errors
|
||||
|
||||
* Mon Nov 29 2021 yaokai <yaokai13@huawei.com> - 1.0.48
|
||||
- recover the dependency for bc
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user