Set functions variables "local" and "readonly" when possible

This commit is contained in:
Tigerblue77 2025-01-26 16:29:56 +00:00
parent 88167eecfb
commit 0230b4833b
2 changed files with 19 additions and 19 deletions

View file

@ -43,13 +43,13 @@ fi
# If server model is Gen 14 (*40) or newer
if [[ $SERVER_MODEL =~ .*[RT][[:space:]]?[0-9][4-9]0.* ]]; then
DELL_POWEREDGE_GEN_14_OR_NEWER=true
CPU1_TEMPERATURE_INDEX=2
CPU2_TEMPERATURE_INDEX=4
readonly DELL_POWEREDGE_GEN_14_OR_NEWER=true
readonly CPU1_TEMPERATURE_INDEX=2
readonly CPU2_TEMPERATURE_INDEX=4
else
DELL_POWEREDGE_GEN_14_OR_NEWER=false
CPU1_TEMPERATURE_INDEX=1
CPU2_TEMPERATURE_INDEX=2
readonly DELL_POWEREDGE_GEN_14_OR_NEWER=false
readonly CPU1_TEMPERATURE_INDEX=1
readonly CPU2_TEMPERATURE_INDEX=2
fi
# Log main informations