From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] applied: [PATCH backup] d/postinst: fixup userid for older termproxy tasks
Date: Wed, 19 Aug 2020 07:27:37 +0200 [thread overview]
Message-ID: <20200819052737.3317-1-t.lamprecht@proxmox.com> (raw)
At the time when we can fix this up the new (and possibly an old)
server daemon process is running, so use the flock CLI tool from
util-linux to ensure we do the same locking as the server and thus we
avoid a race condition.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
debian/postinst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/debian/postinst b/debian/postinst
index b416b7e8..9ab78798 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -14,6 +14,13 @@ case "$1" in
_dh_action=start
fi
deb-systemd-invoke $_dh_action proxmox-backup.service proxmox-backup-proxy.service >/dev/null || true
+
+ if test -n "$2"; then
+ if dpkg --compare-versions "$2" 'le' '0.8.10-1'; then
+ echo "Fixing up termproxy user id in task log..."
+ flock -w 30 /var/log/proxmox-backup/tasks/active.lock sed -i 's/:termproxy::root: /:termproxy::root@pam: /' /var/log/proxmox-backup/tasks/active
+ fi
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
--
2.27.0
reply other threads:[~2020-08-19 5:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200819052737.3317-1-t.lamprecht@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox