summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorSlater, Joseph <joe.slater@windriver.com>2018-02-08 12:22:49 -0800
committerArmin Kuster <akuster808@gmail.com>2018-03-12 10:02:03 -0700
commitea8581cd6750a9acb8ba566ffcf45c57aaeb32bb (patch)
treef4526327ac543b4816f1bcce99c97af90ed04a6a /meta-networking
parent8550bb5a03b606db59179c46959fa4a0235cc2a3 (diff)
downloadmeta-openembedded-ea8581cd6750a9acb8ba566ffcf45c57aaeb32bb.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>
Diffstat (limited to 'meta-networking')
-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 fa5eef9f5..09447d50a 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -239,15 +239,20 @@ pkg_postinst_${PN} () {
239 touch /etc/postfix/virtual_alias 239 touch /etc/postfix/virtual_alias
240 postmap /etc/postfix/virtual_alias 240 postmap /etc/postfix/virtual_alias
241 else 241 else
242 touch $D/etc/aliases
243 newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases
244 touch $D/etc/postfix/virtual_alias
245 postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
246
247 if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then 242 if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
248 # /usr/lib/sendmail is required by LSB core test 243 # /usr/lib/sendmail is required by LSB core test
249 [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/ 244 [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
250 fi 245 fi
246
247 touch $D/etc/aliases
248 # This can fail depending on host setup
249 if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then
250 $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
251 exit 0
252 fi
253 touch $D/etc/postfix/virtual_alias
254 postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
255
251 fi 256 fi
252} 257}
253 258