mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-10 15:31:25 +00:00
Remove dir_mount_map variable
This commit is contained in:
parent
2c155e9e4e
commit
ca85d56f4b
@ -275,7 +275,7 @@ pre_check () {
|
|||||||
fi
|
fi
|
||||||
local -a errs dirs=("${!dir_space_map[@]}")
|
local -a errs dirs=("${!dir_space_map[@]}")
|
||||||
local dir mount avail i=0
|
local dir mount avail i=0
|
||||||
local -A mount_avail_map dir_mount_map mount_space_map
|
local -A mount_avail_map mount_space_map
|
||||||
while read -r mount avail; do
|
while read -r mount avail; do
|
||||||
if [[ $mount == 'Filesystem' ]]; then
|
if [[ $mount == 'Filesystem' ]]; then
|
||||||
continue
|
continue
|
||||||
@ -283,7 +283,6 @@ pre_check () {
|
|||||||
|
|
||||||
dir=${dirs[$((i++))]}
|
dir=${dirs[$((i++))]}
|
||||||
|
|
||||||
dir_mount_map[$dir]=$mount
|
|
||||||
mount_avail_map[$mount]=${avail%M}
|
mount_avail_map[$mount]=${avail%M}
|
||||||
(( mount_space_map[$mount]+=dir_space_map[$dir] ))
|
(( mount_space_map[$mount]+=dir_space_map[$dir] ))
|
||||||
done < <(df -BM --output=source,avail "${dirs[@]}")
|
done < <(df -BM --output=source,avail "${dirs[@]}")
|
||||||
|
Loading…
Reference in New Issue
Block a user