all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-mail-forward 3/3] d/postinst: register binary in .forward
Date: Fri, 21 Oct 2022 15:02:47 +0200	[thread overview]
Message-ID: <20221021130252.176316-5-f.ebner@proxmox.com> (raw)
In-Reply-To: <20221021130252.176316-1-f.ebner@proxmox.com>

Similar to how it is done for pve-manager in PVE. If pvemailforward is
detected, nothing is done. An adapted pve-manager will cleanly handle
the switchover for PVE installations.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 debian/proxmox-mail-forward.postinst | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100755 debian/proxmox-mail-forward.postinst

diff --git a/debian/proxmox-mail-forward.postinst b/debian/proxmox-mail-forward.postinst
new file mode 100755
index 0000000..1c81eea
--- /dev/null
+++ b/debian/proxmox-mail-forward.postinst
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+        # pve-manager is responsible for switching over, so skip when detecting pvemailforward
+        if ! test -f /root/.forward || ! grep -E -q '\|/usr/bin/(proxmox-mail-|pvemail)forward' /root/.forward; then
+            echo '|/usr/bin/proxmox-mail-forward' >>/root/.forward
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure|triggered)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+exit 0
-- 
2.30.2





WARNING: multiple messages have this Message-ID
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-mail-forward 3/3] d/postinst: register binary in .forward
Date: Fri, 21 Oct 2022 15:02:47 +0200	[thread overview]
Message-ID: <20221021130252.176316-5-f.ebner@proxmox.com> (raw)
In-Reply-To: <20221021130252.176316-1-f.ebner@proxmox.com>

Similar to how it is done for pve-manager in PVE. If pvemailforward is
detected, nothing is done. An adapted pve-manager will cleanly handle
the switchover for PVE installations.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 debian/proxmox-mail-forward.postinst | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100755 debian/proxmox-mail-forward.postinst

diff --git a/debian/proxmox-mail-forward.postinst b/debian/proxmox-mail-forward.postinst
new file mode 100755
index 0000000..1c81eea
--- /dev/null
+++ b/debian/proxmox-mail-forward.postinst
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+        # pve-manager is responsible for switching over, so skip when detecting pvemailforward
+        if ! test -f /root/.forward || ! grep -E -q '\|/usr/bin/(proxmox-mail-|pvemail)forward' /root/.forward; then
+            echo '|/usr/bin/proxmox-mail-forward' >>/root/.forward
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure|triggered)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+exit 0
-- 
2.30.2





  parent reply	other threads:[~2022-10-21 13:03 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 13:02 [pve-devel] [PATCH-SERIES proxmox{, -mail-forward, -backup}/pve-manager] add proxmox-mail-forward helper binary Fiona Ebner
2022-10-21 13:02 ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH proxmox 1/1] section config: parse additional properties when schema allows it Fiona Ebner
2022-10-21 13:02   ` [pbs-devel] " Fiona Ebner
2022-10-24 11:47   ` [pve-devel] applied: " Wolfgang Bumiller
2022-10-24 11:47     ` [pbs-devel] " Wolfgang Bumiller
2022-10-21 13:02 ` [pve-devel] [PATCH proxmox-mail-forward 1/3] initial commit Fiona Ebner
2022-10-21 13:02   ` [pbs-devel] " Fiona Ebner
2022-11-10 10:46   ` [pve-devel] applied: " Wolfgang Bumiller
2022-11-10 10:46     ` [pbs-devel] " Wolfgang Bumiller
2022-10-21 13:02 ` [pve-devel] [PATCH proxmox-mail-forward 2/3] add Debian packaging Fiona Ebner
2022-10-21 13:02   ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` Fiona Ebner [this message]
2022-10-21 13:02   ` [pbs-devel] [PATCH proxmox-mail-forward 3/3] d/postinst: register binary in .forward Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH proxmox-backup 1/1] fix #4287: d/control: recommend proxmox-mail-forward Fiona Ebner
2022-10-21 13:02   ` [pbs-devel] " Fiona Ebner
2022-11-10 10:49   ` [pve-devel] applied: " Wolfgang Bumiller
2022-11-10 10:49     ` [pbs-devel] " Wolfgang Bumiller
2022-10-21 13:02 ` [pve-devel] [PATCH manager 1/4] d/control: depend on proxmox-mail-forward Fiona Ebner
2022-10-21 13:02   ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH manager 2/4] d/postinst: replace pvemailforward with proxmox-mail-forward Fiona Ebner
2022-10-21 13:02   ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH manager 3/4] remove pvemailforward binary Fiona Ebner
2022-10-21 13:02   ` [pbs-devel] " Fiona Ebner
2022-10-21 13:02 ` [pve-devel] [PATCH manager 4/4] d/control: drop ${shlibs:Depends} for pve-manager Fiona Ebner
2022-10-21 13:02   ` [pbs-devel] " Fiona Ebner
2022-11-10 11:11   ` [pve-devel] " Thomas Lamprecht
2022-11-10 11:11     ` [pbs-devel] " Thomas Lamprecht
2022-11-10 10:58 ` [pve-devel] applied-series: [PATCH-SERIES proxmox{, -mail-forward, -backup}/pve-manager] add proxmox-mail-forward helper binary Wolfgang Bumiller
2022-11-10 10:58   ` [pbs-devel] " Wolfgang Bumiller

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=20221021130252.176316-5-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=pve-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal