mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 16:27:27 +00:00
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> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
committed by
Joe MacDonald
parent
4048f755f1
commit
c2ed581dc3
@@ -239,15 +239,20 @@ pkg_postinst_${PN} () {
|
|||||||
touch /etc/postfix/virtual_alias
|
touch /etc/postfix/virtual_alias
|
||||||
postmap /etc/postfix/virtual_alias
|
postmap /etc/postfix/virtual_alias
|
||||||
else
|
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
|
if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
|
||||||
# /usr/lib/sendmail is required by LSB core test
|
# /usr/lib/sendmail is required by LSB core test
|
||||||
[ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
|
[ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
|
||||||
fi
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user