summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/postfix/postfix.inc
diff options
context:
space:
mode:
authorQi.Chen@windriver.com <Qi.Chen@windriver.com>2019-07-15 16:09:55 +0800
committerKhem Raj <raj.khem@gmail.com>2019-07-15 08:03:29 -0700
commitdbe4429e739ede16fbee008b736c08390b3c62f4 (patch)
tree2c0e806533ee3c492fd8650c845c03a25c3b36db /meta-networking/recipes-daemons/postfix/postfix.inc
parentc1ecd778cef733caf1e3b0ced7fd4da21f080e6d (diff)
downloadmeta-openembedded-dbe4429e739ede16fbee008b736c08390b3c62f4.tar.gz
postfix: use alternatives to manage /usr/lib/sendmail
There are several packages which all provide /usr/lib/sendmail when lsb is enabled. So use alternative to manage it. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons/postfix/postfix.inc')
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix.inc11
1 files changed, 5 insertions, 6 deletions
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index 3d4f1df43..94379412f 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -196,11 +196,15 @@ do_install_append_class-native() {
196 ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq 196 ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
197} 197}
198 198
199ALTERNATIVE_${PN} += "sendmail mailq newaliases" 199ALTERNATIVE_${PN} = "sendmail mailq newaliases"
200# /usr/lib/sendmial is required by LSB core test
201ALTERNATIVE_${PN}_linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail"
200ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq" 202ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
201ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases" 203ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
202ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix" 204ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix"
203ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" 205ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
206ALTERNATIVE_TARGET[usr-lib-sendmail] = "${sbindir}/sendmail.postfix"
207ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
204 208
205ALTERNATIVE_PRIORITY = "120" 209ALTERNATIVE_PRIORITY = "120"
206 210
@@ -219,11 +223,6 @@ pkg_postinst_${PN} () {
219 touch /etc/postfix/virtual_alias 223 touch /etc/postfix/virtual_alias
220 postmap /etc/postfix/virtual_alias 224 postmap /etc/postfix/virtual_alias
221 else 225 else
222 if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
223 # /usr/lib/sendmail is required by LSB core test
224 [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
225 fi
226
227 touch $D/etc/aliases 226 touch $D/etc/aliases
228 # This can fail depending on host setup 227 # This can fail depending on host setup
229 if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then 228 if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then