diff options
| author | Bian Naimeng <biannm@cn.fujitsu.com> | 2015-02-16 15:52:35 +0800 |
|---|---|---|
| committer | Joe MacDonald <joe_macdonald@mentor.com> | 2015-02-23 13:53:32 -0500 |
| commit | 710459da208c89b44291b0fced8c288a14ad99b3 (patch) | |
| tree | d0706c6ad82a03df2c784efb2f4779d6ca7c7a6c | |
| parent | 9b67eabcec04c2927f61b7a256505d8813c763f8 (diff) | |
| download | meta-openembedded-710459da208c89b44291b0fced8c288a14ad99b3.tar.gz | |
postfix: don't hard-code PATH in service file
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
| -rw-r--r-- | meta-networking/recipes-daemons/postfix/files/postfix.service | 10 | ||||
| -rw-r--r-- | meta-networking/recipes-daemons/postfix/postfix.inc | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/meta-networking/recipes-daemons/postfix/files/postfix.service b/meta-networking/recipes-daemons/postfix/files/postfix.service index c781038d88..02ea640b25 100644 --- a/meta-networking/recipes-daemons/postfix/files/postfix.service +++ b/meta-networking/recipes-daemons/postfix/files/postfix.service | |||
| @@ -5,11 +5,11 @@ Conflicts=sendmail.service exim.service | |||
| 5 | 5 | ||
| 6 | [Service] | 6 | [Service] |
| 7 | Type=forking | 7 | Type=forking |
| 8 | PIDFile=/var/spool/postfix/pid/master.pid | 8 | PIDFile=@LOCALSTATEDIR@/spool/postfix/pid/master.pid |
| 9 | ExecStartPre=-/usr/libexec/postfix/aliasesdb | 9 | ExecStartPre=-@LIBEXECDIR@/aliasesdb |
| 10 | ExecStart=/usr/sbin/postfix start | 10 | ExecStart=@SBINDIR@/postfix start |
| 11 | ExecReload=/usr/sbin/postfix reload | 11 | ExecReload=@SBINDIR@/postfix reload |
| 12 | ExecStop=/usr/sbin/postfix stop | 12 | ExecStop=@SBINDIR@/postfix stop |
| 13 | 13 | ||
| 14 | [Install] | 14 | [Install] |
| 15 | WantedBy=multi-user.target | 15 | WantedBy=multi-user.target |
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc index e73f2f098c..a6909e9b5b 100644 --- a/meta-networking/recipes-daemons/postfix/postfix.inc +++ b/meta-networking/recipes-daemons/postfix/postfix.inc | |||
| @@ -147,7 +147,9 @@ do_install () { | |||
| 147 | 147 | ||
| 148 | install -d ${D}${systemd_unitdir}/system | 148 | install -d ${D}${systemd_unitdir}/system |
| 149 | install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system | 149 | install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system |
| 150 | sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/postfix.service | 150 | sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/postfix.service |
| 151 | sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service | ||
| 152 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service | ||
| 151 | 153 | ||
| 152 | install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir} | 154 | install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir} |
| 153 | 155 | ||
