evomaintenance: upstream release 0.6.2
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Jérémy Lecour 2020-03-02 14:45:41 +01:00 committed by Jérémy Lecour
parent eb74bda22a
commit af53a6b2ec
2 changed files with 24 additions and 9 deletions

View file

@ -52,7 +52,7 @@ The **patch** part changes incrementally at each release.
* evocheck: cron jobs execute in verbose * evocheck: cron jobs execute in verbose
* evolinux-base: use "evolinux_internal_group" for SSH authentication * evolinux-base: use "evolinux_internal_group" for SSH authentication
* evomaintenance: Turn on API by default (instead of DB) * evomaintenance: Turn on API by default (instead of DB)
* evomaintenance: upstream version 0.6.0 * evomaintenance: upstream version 0.6.2
* evomaintenance: install PG dependencies only when needed * evomaintenance: install PG dependencies only when needed
* listupgrade: update from upstream * listupgrade: update from upstream
* lxc-php: refactor tasks for better maintainability * lxc-php: refactor tasks for better maintainability

View file

@ -7,7 +7,7 @@
# Copyright 2007-2019 Evolix <info@evolix.fr>, Gregory Colpart <reg@evolix.fr>, # Copyright 2007-2019 Evolix <info@evolix.fr>, Gregory Colpart <reg@evolix.fr>,
# Jérémy Lecour <jlecour@evolix.fr> and others. # Jérémy Lecour <jlecour@evolix.fr> and others.
VERSION="0.6.0" VERSION="0.6.2"
show_version() { show_version() {
cat <<END cat <<END
@ -169,16 +169,31 @@ print_session_data() {
} }
is_repository_readonly() { is_repository_readonly() {
mountpoint=$(stat -c '%m' $1) if [ "$(get_system)" = "OpenBSD" ]; then
findmnt ${mountpoint} --noheadings --output OPTIONS | grep -q -E "\bro\b" partition=$(stat -f '%Sd' $1)
mount | grep ${partition} | grep -q "read-only"
else
mountpoint=$(stat -c '%m' $1)
findmnt ${mountpoint} --noheadings --output OPTIONS -O ro
fi
} }
remount_repository_readwrite() { remount_repository_readwrite() {
mountpoint=$(stat -c '%m' $1) if [ "$(get_system)" = "OpenBSD" ]; then
mount -o remount,rw ${mountpoint} partition=$(stat -f '%Sd' $1)
mount -u -w /dev/${partition} 2>/dev/null
else
mountpoint=$(stat -c '%m' $1)
mount -o remount,rw ${mountpoint}
fi
} }
remount_repository_readonly() { remount_repository_readonly() {
mountpoint=$(stat -c '%m' $1) if [ "$(get_system)" = "OpenBSD" ]; then
mount -o remount,ro ${mountpoint} 2>/dev/null partition=$(stat -f '%Sd' $1)
mount -u -r /dev/${partition} 2>/dev/null
else
mountpoint=$(stat -c '%m' $1)
mount -o remount,ro ${mountpoint} 2>/dev/null
fi
} }
hook_commit() { hook_commit() {
@ -532,7 +547,7 @@ if [ "${INTERACTIVE}" = "1" ] && [ "${EVOCHECK}" = "1" ]; then
get_evocheck get_evocheck
fi fi
if [ -n "${GIT_STATUSES}" ] && [ "${INTERACTIVE}" = "1" ]; then if [ -n "${GIT_STATUSES}" ] && [ "${INTERACTIVE}" = "1" ]; then
printf "/!\ There are some uncommited changes.\n%s\n\n" "${GIT_STATUSES}" printf "/!\\\ There are some uncommited changes.\n%s\n\n" "${GIT_STATUSES}"
fi fi
if [ -z "${MESSAGE}" ]; then if [ -z "${MESSAGE}" ]; then