etc-git : Remount /usr in rw for git gc in in /usr/share/scripts/

This commit is contained in:
Jérémy Dubois 2022-04-01 15:47:44 +02:00
parent 6434adcc62
commit 726735d269
2 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
* generate-ldif: Correct generated entries for php-fpm in containers
* redis: Remount /usr with RW before adding nagios plugin
* postfix: Do not send mails through milters a second time after amavis (in packmail)
* etc-git : Remount /usr in rw for git gc in in /usr/share/scripts/
### Removed

View File

@ -6,6 +6,12 @@ repositories="/etc /etc/bind/ /usr/share/scripts"
for repository in ${repositories}; do
if [ -d "${repository}/.git" ]; then
if [ ${repository} = "/usr/share/scripts" ]; then
mount -o remount,rw /usr
fi
git --git-dir="${repository}/.git" gc --quiet
if [ ${repository} = "/usr/share/scripts" ]; then
mount -o remount /usr
fi
fi
done