Merge pull request 'Add commiting changes to /etc in lxc containers' (#15) from lxc-etc-git into master

Reviewed-on: #15
This commit is contained in:
Mathieu Trossevin 2022-03-17 18:04:19 +01:00
commit 4ef8878bcf
2 changed files with 7 additions and 0 deletions

View file

@ -5,6 +5,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
### Added
* Commit change in /etc of lxc containers
### Changed
### Deprecated

View file

@ -536,6 +536,11 @@ EVOCHECK_BIN="/usr/share/scripts/evocheck.sh"
GIT_REPOSITORIES="/etc /etc/bind /usr/share/scripts"
# Add /etc directories from lxc containers if they are git directories
if [ -d /var/lib/lxc ]; then
GIT_REPOSITORIES="${GIT_REPOSITORIES} $(find /var/lib/lxc/ -maxdepth 3 -name 'etc' | tr '\n' ' ' | sed 's/[[:space:]]\+$//')"
fi
# initialize variable
GIT_STATUSES=""
# git statuses