All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe PATCH] zram: Avoid installing init and services, if unused
@ 2019-10-05 13:35 Otavio Salvador
  0 siblings, 0 replies; only message in thread
From: Otavio Salvador @ 2019-10-05 13:35 UTC (permalink / raw)
  To: Meta-OpenEmbedded Mailing listing

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 meta-oe/recipes-extended/zram/zram_0.1.bb | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/meta-oe/recipes-extended/zram/zram_0.1.bb b/meta-oe/recipes-extended/zram/zram_0.1.bb
index dfd75e71c..564a0877c 100644
--- a/meta-oe/recipes-extended/zram/zram_0.1.bb
+++ b/meta-oe/recipes-extended/zram/zram_0.1.bb
@@ -16,11 +16,16 @@ SRC_URI = " \
 
 do_install () {
     # Sysvinit
-    install -d ${D}${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/zram.service ${D}${systemd_unitdir}/system
+    if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram
+    fi
+
+    # SystemD
+    if ${@bb.utils.filter('DISTRO_FEATURES','systemd','true','false',d)}; then
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/zram.service ${D}${systemd_unitdir}/system
+    fi
 }
 
 FILES_${PN} = "${sysconfdir}"
-- 
2.23.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-05 13:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-05 13:35 [meta-oe PATCH] zram: Avoid installing init and services, if unused Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.