fix(apps): lève les remarques SonarCloud sur les tests de rétention, le script du coffre et la fumée CI

This commit is contained in:
Johan LEROY
2026-09-24 10:42:50 +02:00
parent fa815f49b6
commit 7730f184e7
3 changed files with 29 additions and 14 deletions
+10 -3
View File
@@ -98,7 +98,8 @@ poser_image() {
}
fstab_contient() {
awk -v cible="$1" '$1 !~ /^#/ && $2 == cible { trouve = 1 } END { exit !trouve }' /etc/fstab
local cible="$1"
awk -v cible="$cible" '$1 !~ /^#/ && $2 == cible { trouve = 1 } END { exit !trouve }' /etc/fstab
}
poser_persistance() {
@@ -132,8 +133,14 @@ CONF
systemctl daemon-reload
}
empreinte() { find "$1" -type f -printf '%s\n' | awk '{ n++; s += $1 } END { printf "%d fichiers, %d octets", n, s }'; }
libre() { df -B1 --output=avail "$1" | tail -1 | tr -d ' '; }
empreinte() {
local dossier="$1"
find "$dossier" -type f -printf '%s\n' | awk '{ n++; s += $1 } END { printf "%d fichiers, %d octets", n, s }'
}
libre() {
local dossier="$1"
df -B1 --output=avail "$dossier" | tail -1 | tr -d ' '
}
expliquer_migration() {
cat <<FIN