Package: opensmtpd
Version: 6.0.3p1-4
Tags: patch

If ROOT_ADDRESS is not set, then postinst fails in line 144
with "[: argument expected".

Patch is attached. I would suggest to rewrite all test statements
around $ROOT_ADDRESS in this way.


Regards
Harri
--- debian/postinst.bak	2018-01-16 16:16:54.000000000 +0100
+++ debian/postinst	2019-02-05 14:04:38.134413140 +0100
@@ -141,7 +141,7 @@
 fi
 db_fset opensmtpd/root_address changed false
 db_fget opensmtpd/root_address first || true
-if [ "${RET}" = "true" -a ${ROOT_ADDRESS} ]; then
+if [ "${RET}" = "true" -a "x${ROOT_ADDRESS}" != "x" ]; then
     # It's our first time configuring aliases; create a postmaster alias as
     # promised in the template if it doesn't already exist. Use ed to insert it
     # after the root alias, which is guaranteed to exist by the actions above.

Reply via email to