[oe-commits] Chong.Lu at windriver.com : samba: fix error messages when startup samba service

git at git.openembedded.org git at git.openembedded.org
Mon Dec 29 09:11:27 UTC 2014


Module: meta-openembedded.git
Branch: dizzy-next
Commit: e324dd37cfc2f89eb9d392dac700416cd281db2c
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=e324dd37cfc2f89eb9d392dac700416cd281db2c

Author: Chong.Lu at windriver.com <Chong.Lu at windriver.com>
Date:   Thu Oct 30 18:23:03 2014 +0800

samba: fix error messages when startup samba service

This solves the following error messages when startup samba:

  Unable to open new log file '/var/log/samba/log.smbd': No such file or directory

Signed-off-by: Chong Lu <Chong.Lu at windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>

---

 meta-oe/recipes-connectivity/samba/samba.inc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-connectivity/samba/samba.inc b/meta-oe/recipes-connectivity/samba/samba.inc
index 4392821..68e1b1f 100644
--- a/meta-oe/recipes-connectivity/samba/samba.inc
+++ b/meta-oe/recipes-connectivity/samba/samba.inc
@@ -35,7 +35,7 @@ EXTRA_OECONF='--disable-cups \
               --with-privatedir=${sysconfdir}/samba/private \
               --with-lockdir=${localstatedir}/lock \
               --with-piddir=${localstatedir}/run \
-              --with-logfilebase=${localstatedir}/log \
+              --with-logfilebase=${localstatedir}/log/samba \
               --libdir=${libdir} \
               --with-mandir=${mandir} \
               --with-swatdir=${datadir}/swat \
@@ -123,6 +123,12 @@ do_install_append() {
     sed -e 's, at BASE_BINDIR@,${base_bindir},g' \
         -e 's, at SBINDIR@,${sbindir},g' \
         -i ${D}${systemd_unitdir}/system/*.service
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+	install -d ${D}${sysconfdir}/tmpfiles.d
+	echo "d ${localstatedir}/log/samba 0755 root root -" \
+            > ${D}${sysconfdir}/tmpfiles.d/99-${BPN}.conf
+    fi
 }
 
 DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}"



More information about the Openembedded-commits mailing list