aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2016-08-04 23:40:15 -0400
committerAndreas Oberritter <obi@opendreambox.org>2017-02-16 11:29:16 +0100
commitefd55660503d2439b58c49509f8f424f02f35b9d (patch)
treed187939ab89386965165d7ec8a1fe4189d5f7ccb
parent2ce2ff6bc2ff1e65b038ba2c778d04ec6f608038 (diff)
downloadmeta-openembedded-contrib-efd55660503d2439b58c49509f8f424f02f35b9d.tar.gz
meta-openembedded-contrib-efd55660503d2439b58c49509f8f424f02f35b9d.tar.bz2
meta-openembedded-contrib-efd55660503d2439b58c49509f8f424f02f35b9d.zip
samba: inherit update-rc.d to manage init script
inherit update-rc.d to manage init script, so we can avoid duplicating the update-rc.d commands, and the default behavior can be easily overridden by distro. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> (cherry picked from commit 32a6fd48ab781c15c37551f4e8ed6721ca5cb87b) Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta-networking/recipes-connectivity/samba/samba_4.4.2.bb9
1 files changed, 4 insertions, 5 deletions
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 2f08b63bcc..1255b3eb63 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
@@ -24,7 +24,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
SRC_URI[md5sum] = "03a65a3adf08ceb1636ad59d234d7f9d"
SRC_URI[sha256sum] = "eaecd41a85ebb9507b8db9856ada2a949376e9d53cf75664b5493658f6e5926a"
-inherit systemd waf-samba cpan-base perlnative
+inherit systemd waf-samba cpan-base perlnative update-rc.d
# remove default added RDEPENDS on perl
RDEPENDS_${PN}_remove = "perl"
@@ -33,6 +33,9 @@ DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libld
SYSVINITTYPE_linuxstdbase = "lsb"
SYSVINITTYPE = "sysv"
+INITSCRIPT_NAME = "samba.sh"
+INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
+
PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${SYSVINITTYPE}', '', d)} \
${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
@@ -102,8 +105,6 @@ do_install_append() {
elif ${@bb.utils.contains('PACKAGECONFIG', 'lsb', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/init.d
install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d
- update-rc.d -r ${D} samba.sh start 20 3 5 .
- update-rc.d -r ${D} samba.sh start 20 0 1 6 .
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
@@ -112,8 +113,6 @@ do_install_append() {
-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
install -d ${D}${sysconfdir}/samba