aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlater, Joseph <joe.slater@windriver.com>2018-02-08 12:22:49 -0800
committerArmin Kuster <akuster808@gmail.com>2018-02-11 13:39:28 -0800
commit762c08387c214d088066bf734f454625669dd5b6 (patch)
treecbc90d24a9b27088621bb332f992bf7404facdef
parentfe7bc75fda2c0abfd7c3735a3f5d7f56ba3d6207 (diff)
downloadmeta-openembedded-contrib-762c08387c214d088066bf734f454625669dd5b6.tar.gz
postfix: adapt pkg_postinst to postinst_intercept
Request delay to first boot if newaliases fails on host. Check for linuxstdbase before we might fail. Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix.inc15
1 files changed, 10 insertions, 5 deletions
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index fa5eef9f55..09447d50ad 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -239,15 +239,20 @@ pkg_postinst_${PN} () {
touch /etc/postfix/virtual_alias
postmap /etc/postfix/virtual_alias
else
- touch $D/etc/aliases
- newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases
- touch $D/etc/postfix/virtual_alias
- postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
-
if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
# /usr/lib/sendmail is required by LSB core test
[ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
fi
+
+ touch $D/etc/aliases
+ # This can fail depending on host setup
+ if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then
+ $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
+ exit 0
+ fi
+ touch $D/etc/postfix/virtual_alias
+ postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
+
fi
}