diff options
author | Roy Li <rongqing.li@windriver.com> | 2014-11-10 13:05:37 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2014-11-10 15:18:55 -0500 |
commit | c78eca1ea7452a62f86b740ec59f1cd39e399d73 (patch) | |
tree | 24aba8749850306ba390dcfa415787579804c8b7 /meta-networking/recipes-daemons/postfix/postfix.inc | |
parent | 4b6970c24c3fb0926fd700678c0e11de43a5bf92 (diff) | |
download | meta-openembedded-c78eca1ea7452a62f86b740ec59f1cd39e399d73.tar.gz |
postfix: create or update aliases.db when using systemd
aliases.db should be created by postinstall script, but failed since
queue_directory is not includes root dir ${D}:
------
|newaliases: fatal: chdir /var/spool/postfix: No such file or directory
------
initscript will recall newaliases before start postfix daemon, the similar
method, which run aliasesdb to create aliases.db when using systemd, is
introduced to fix this issue.
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-daemons/postfix/postfix.inc')
-rw-r--r-- | meta-networking/recipes-daemons/postfix/postfix.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc index c58787ed6..d2f33569e 100644 --- a/meta-networking/recipes-daemons/postfix/postfix.inc +++ b/meta-networking/recipes-daemons/postfix/postfix.inc | |||
@@ -22,6 +22,7 @@ SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV | |||
22 | file://postfix \ | 22 | file://postfix \ |
23 | file://internal_recipient \ | 23 | file://internal_recipient \ |
24 | file://postfix.service \ | 24 | file://postfix.service \ |
25 | file://aliasesdb \ | ||
25 | " | 26 | " |
26 | 27 | ||
27 | S = "${WORKDIR}/postfix-${PV}" | 28 | S = "${WORKDIR}/postfix-${PV}" |
@@ -149,6 +150,8 @@ do_install () { | |||
149 | install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system | 150 | install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system |
150 | sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/postfix.service | 151 | sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/postfix.service |
151 | 152 | ||
153 | install -m 0755 ${WORKDIR}/aliasesdb ${D}${exec_prefix}/libexec/postfix/ | ||
154 | |||
152 | install -m 770 -d ${D}${localstatedir}/spool/postfix | 155 | install -m 770 -d ${D}${localstatedir}/spool/postfix |
153 | chown postfix:postfix ${D}${localstatedir}/spool/postfix | 156 | chown postfix:postfix ${D}${localstatedir}/spool/postfix |
154 | chown postfix:postfix ${D}${localstatedir}/lib/postfix | 157 | chown postfix:postfix ${D}${localstatedir}/lib/postfix |