IS_VARTMPFS: use findmnt if available
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Jérémy Lecour 2020-09-04 15:36:51 +02:00 committed by Jérémy Lecour
parent 6993e8f8b3
commit 83fa22a72a
2 changed files with 8 additions and 4 deletions

View File

@ -10,6 +10,7 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
* IS_EVOBACKUP_EXCLUDE_MOUNT: exclude disabled backup scripts
* IS_DUPLICATE_FS_LABEL: disable blkid cache
* IS_POSTGRES_BACKUP: look for compressed backup too
* IS_VARTMPFS: use findmnt if available
### Deprecated

View File

@ -205,10 +205,13 @@ check_customsudoers() {
grep -E -qr "umask=0077" /etc/sudoers* || failed "IS_CUSTOMSUDOERS" "missing umask=0077 in sudoers file"
}
check_vartmpfs() {
df /var/tmp | grep -q tmpfs || failed "IS_VARTMPFS" "/var/tmp is not a tmpfs"
}
check_vartmpfs() {
df /var/tmp | grep -q tmpfs || failed "IS_VARTMPFS" "/var/tmp is not a tmpfs"
FINDMNT_BIN=$(command -v findmnt)
if [ -x "${FINDMNT_BIN}" ]; then
${FINDMNT_BIN} /var/tmp --type tmpfs --noheadings > /dev/null || failed "IS_VARTMPFS" "/var/tmp is not a tmpfs"
else
df /var/tmp | grep -q tmpfs || failed "IS_VARTMPFS" "/var/tmp is not a tmpfs"
fi
}
check_serveurbase() {
is_installed serveur-base || failed "IS_SERVEURBASE" "serveur-base package is not installed"