[OE-core] [PATCH] systemd.bbclass: enable all services specified in ${SYSTEMD_SERVICE}

Mikko Rapeli mikko.rapeli at bmw.de
Wed Oct 16 12:32:04 UTC 2019


This has been the traditional way of enabling systemd services.
It may conflict with presets feature, but other layers, image classes
and recipes add services to be enabled using SYSTEMD_SERVICE
variable also with read-only rootfs, e.g. IMAGE_FEATURES has
stateless-rootfs and systemd_preset_all task is not executed.

Fixes startup of custom services from our recipes using custom
image classes with various BSP layers. In the worst case even
serial console getty service wasn't starting due to dependency
no not enabled services.

Signed-off-by: Mikko Rapeli <mikko.rapeli at bmw.de>
---
 meta/classes/systemd.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 1dca099..ae03c6f 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -33,7 +33,7 @@ if type systemctl >/dev/null 2>/dev/null; then
 	if [ "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
 		for service in ${SYSTEMD_SERVICE_ESCAPED}; do
 			case "${service}" in
-			*@*)
+			*)
 				systemctl ${OPTS} enable "${service}"
 				;;
 			esac
-- 
1.9.1



More information about the Openembedded-core mailing list