Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
---
 debian/postinst | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index 0e49eb56..fca33bd5 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -58,13 +58,8 @@ EOF
        pveam update || true
     fi
 
-    if test -f /root/.forward; then
-       if ! grep -q '|/usr/bin/pvemailforward' /root/.forward; then 
-           echo -e "|/usr/bin/pvemailforward\n$(cat /root/.forward)" 
>/root/.forward.tmp
-           mv /root/.forward.tmp /root/.forward
-       fi
-    else
-       echo '|/usr/bin/pvemailforward' >/root/.forward
+    if ! test -f /root/.forward || ! grep -q '|/usr/bin/pvemailforward' 
/root/.forward; then
+       echo '|/usr/bin/pvemailforward' >>/root/.forward
     fi
 
     if [ -f /etc/systemd/system/ceph.service ]; then
-- 
2.14.2


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to