[oe] [meta-networking][PATCH] samba: fix paths in sysv initscript

Richard Leitner richard.leitner at skidata.com
Fri Apr 29 06:55:21 UTC 2016


The sysv initscript provided by samba assumes smbd and nmbd are
installed in /opt/samba/bin/. In our case both binaries are installed to
/usr/sbin/ by default. Therefore fix these paths.

Furthermore fix the log and config directory as well as the name of the
initscript in its usage text.

Signed-off-by: Richard Leitner <richard.leitner at skidata.com>
---
 meta-networking/recipes-connectivity/samba/samba_4.4.2.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb b/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
index 9358ca5..5b5ed58 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
@@ -103,6 +103,11 @@ do_install_append() {
     elif ${@bb.utils.contains('PACKAGECONFIG', 'sysv', 'true', 'false', d)}; then
         install -d ${D}${sysconfdir}/init.d
         install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba.sh
+        sed -e 's,/opt/samba/bin,${sbindir},g' \
+            -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
+            -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
+            -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba.sh,g' \
+            -i ${D}${sysconfdir}/init.d/samba.sh
         update-rc.d -r ${D} samba.sh start 20 3 5 .
         update-rc.d -r ${D} samba.sh start 20 0 1 6 .
     fi
-- 
2.1.4




More information about the Openembedded-devel mailing list