From 72ce4c5203cb478667d0f42a1794ced2f08bdc93 Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Wed, 12 Feb 2014 21:18:12 +0100 Subject: [PATCH] sysmocom-nitb-image: enable nitb for sysvinit or systemd --- recipes-apps/images/sysmocom-nitb-image.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes-apps/images/sysmocom-nitb-image.bb b/recipes-apps/images/sysmocom-nitb-image.bb index fe797d6..80f90e7 100644 --- a/recipes-apps/images/sysmocom-nitb-image.bb +++ b/recipes-apps/images/sysmocom-nitb-image.bb @@ -5,4 +5,8 @@ activate_nitb() { echo "NO_START=0" > ${IMAGE_ROOTFS}/etc/default/osmo-nitb } -IMAGE_PREPROCESS_COMMAND += "activate_nitb; " +activate_systemd_nitb() { + ln -sf ${systemd_unitdir}/system/osmo-nitb.service ${IMAGE_ROOTFS}/etc/systemd/system/multi-user.target.wants/ +} + +IMAGE_PREPROCESS_COMMAND += "${@base_contains('DISTRO_FEATURES','systemd','activate_systemd_nitb','activate_nitb',d)}; "