]> code.ossystems Code Review - openembedded-core.git/commitdiff
msmtp: add link file /usr/lib/sendmail
authorKai Kang <kai.kang@windriver.com>
Mon, 16 Feb 2015 02:41:14 +0000 (10:41 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Mar 2015 17:38:44 +0000 (17:38 +0000)
Link file /usr/lib/sendmail points to /usr/sbin/sendmail is required by
LSB core test according to Linux FHS: "For historical reasons,
/usr/lib/sendmail must be a symbolic link to /usr/sbin/sendmail if the
latter exists."

Create the link file /usr/lib/sendmail if it doesn't exist.

Refs:
1 http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/normativerefs.html#STD.LSB
2 http://www.pathname.com/fhs/pub/fhs-2.3.html#SPECIFICOPTIONS13

Signed-off-by: Kai Kang <kai.kang@windriver.com>
meta/recipes-extended/msmtp/msmtp_1.6.1.bb

index c9ad1da25352cbb71599a30359eeb193f1840129..d6f3a1516ffbcd5df8b591e666075aff39d67377 100644 (file)
@@ -23,3 +23,8 @@ ALTERNATIVE_${PN} = "sendmail"
 ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
 ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
 ALTERNATIVE_PRIORITY = "100"
+
+pkg_postinst_${PN}_linuxstdbase () {
+       # /usr/lib/sendmial is required by LSB core test
+       [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
+}