From 0d48a8eec3e503e3083db4252666937996c9e3bc Mon Sep 17 00:00:00 2001 From: Jeremy Dubois Date: Thu, 9 Jun 2022 16:16:03 +0200 Subject: [PATCH] update-evobackup-canary : do not use GNU date, for it to be compatible with OpenBSD --- client/CHANGELOG.md | 1 + client/update-evobackup-canary | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/CHANGELOG.md b/client/CHANGELOG.md index e08d4db..2ff2a45 100644 --- a/client/CHANGELOG.md +++ b/client/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Use --dump-dir instead of --backup-dir to supress dump-server-state warning * Do not use rsync compression * Replace rsync option --verbose by --itemize-changes +# update-evobackup-canary : do not use GNU date, for it to be compatible with OpenBSD ### Deprecated diff --git a/client/update-evobackup-canary b/client/update-evobackup-canary index 20fc1a5..868c3be 100644 --- a/client/update-evobackup-canary +++ b/client/update-evobackup-canary @@ -3,7 +3,7 @@ PROGNAME="update-evobackup-canary" REPOSITORY="https://gitea.evolix.org/evolix/evobackup" -VERSION="22.05" +VERSION="22.06" readonly VERSION # base functions @@ -44,8 +44,8 @@ main() { if [ -z "${canary_file:-}" ]; then canary_file="/zzz_evobackup_canary" fi - # This option is supported since (at least) Debian 8 - date=$(date --iso-8601=seconds) + # This option is supported both on OpenBSD which does not use GNU date and on Debian + date=$(date "+%FT%T%z") printf "%s %s\n" "${date}" "${who}" >> "${canary_file}" }