forked from evolix/evocheck
IS_EVOBACKUP_EXCLUDE_MOUNT: fix one-file-system restriction
This commit is contained in:
parent
f5b19ad656
commit
bef0eba539
|
@ -15,6 +15,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
* IS_EVOBACKUP_EXCLUDE_MOUNT: fix one-file-system restriction
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
## [22.04] 2022-04-25
|
## [22.04] 2022-04-25
|
||||||
|
|
|
@ -603,13 +603,13 @@ check_evobackup_exclude_mount() {
|
||||||
for evobackup_file in $(find /etc/cron* -name '*evobackup*' | grep -v -E ".disabled$"); do
|
for evobackup_file in $(find /etc/cron* -name '*evobackup*' | grep -v -E ".disabled$"); do
|
||||||
# If rsync is not limited by "one-file-system"
|
# If rsync is not limited by "one-file-system"
|
||||||
# then we verify that every mount is excluded
|
# then we verify that every mount is excluded
|
||||||
grep -q -- "^\s*--one-file-system" "${evobackup_file}" \
|
if ! grep -q -- "^\s*--one-file-system" "${evobackup_file}"; then
|
||||||
|| grep -- "--exclude " "${evobackup_file}" | grep -E -o "\"[^\"]+\"" | tr -d '"' \
|
grep -- "--exclude " "${evobackup_file}" | grep -E -o "\"[^\"]+\"" | tr -d '"' > "${excludes_file}"
|
||||||
> "${excludes_file}"
|
|
||||||
not_excluded=$(findmnt --type nfs,nfs4,fuse.sshfs, -o target --noheadings | grep -v -f "${excludes_file}")
|
not_excluded=$(findmnt --type nfs,nfs4,fuse.sshfs, -o target --noheadings | grep -v -f "${excludes_file}")
|
||||||
for mount in ${not_excluded}; do
|
for mount in ${not_excluded}; do
|
||||||
failed "IS_EVOBACKUP_EXCLUDE_MOUNT" "${mount} is not excluded from ${evobackup_file} backup script"
|
failed "IS_EVOBACKUP_EXCLUDE_MOUNT" "${mount} is not excluded from ${evobackup_file} backup script"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
# Verification de la presence du userlogrotate
|
# Verification de la presence du userlogrotate
|
||||||
|
|
Loading…
Reference in a new issue