Patchwork [meta-oe,v2] samba: fix install for older samba versions

login
register
mail settings
Submitter Andreas Oberritter
Date March 7, 2013, 3:04 p.m.
Message ID <1362668650-19705-1-git-send-email-obi@opendreambox.org>
Download mbox | patch
Permalink /patch/45655/
State Accepted, archived
Commit f44c52cbae96c81a20fa91d528eb0bbc5abaec06
Headers show

Comments

Andreas Oberritter - March 7, 2013, 3:04 p.m.
* Samba 3.0 doesn't build libnss_*.so
* base_sbindir may contain mount.cifs

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta-oe/recipes-connectivity/samba/samba.inc |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Patch

diff --git a/meta-oe/recipes-connectivity/samba/samba.inc b/meta-oe/recipes-connectivity/samba/samba.inc
index 3ee43ad..42ddce5 100644
--- a/meta-oe/recipes-connectivity/samba/samba.inc
+++ b/meta-oe/recipes-connectivity/samba/samba.inc
@@ -87,10 +87,12 @@  do_install_append() {
 	install -d ${D}/var/spool/samba
 
 	# Install other stuff not installed by "make install"
-	install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_winbind.so ${D}${libdir}/libnss_winbind.so.2
-	install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_wins.so ${D}${libdir}/libnss_wins.so.2
+	if [ -d ${WORKDIR}/${PN}-${PV}/nsswitch ]; then
+		install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_winbind.so ${D}${libdir}/libnss_winbind.so.2
+		install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_wins.so ${D}${libdir}/libnss_wins.so.2
+	fi
 
-	rmdir ${D}${base_sbindir}
+	rmdir --ignore-fail-on-non-empty ${D}${base_sbindir}
 	sed -i -e '1s,#!.*perl,#!${USRBINPATH}/env perl,' ${D}${bindir}/findsmb
 }