[oe-commits] Otavio Salvador : systemd-systemctl-native: add support to recursive services
git at git.openembedded.org
git at git.openembedded.org
Thu Dec 15 08:30:33 UTC 2011
Module: meta-openembedded.git
Branch: master
Commit: 2cba3b024407bf0cdba09b27e06eb207ea77a754
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=2cba3b024407bf0cdba09b27e06eb207ea77a754
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Tue Dec 13 10:43:43 2011 +0000
systemd-systemctl-native: add support to recursive services
Some services can reference others for installation thought the Also
key; systemctl now handles it calling itself recursively for each
service.
Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
---
.../systemd/systemd-systemctl-native.bb | 2 ++
.../systemd/systemd-systemctl-native/systemctl | 8 ++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb b/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb
index 3ee757e..dcd67ee 100644
--- a/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb
+++ b/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb
@@ -3,6 +3,8 @@ DESCRIPTION = "Wrapper to enable of systemd services"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+PR = "r1"
+
inherit native
SRC_URI = "file://systemctl"
diff --git a/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl b/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
index 1fc77fd..54c1a18 100755
--- a/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
+++ b/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
@@ -49,3 +49,11 @@ for r in $wanted_by; do
ln -s $service_file $ROOT/etc/systemd/system/$r.wants
echo "Enabled $service for $wanted_by."
done
+
+# call us for the other required scripts
+also=$(grep Also $ROOT/$service_file \
+ | sed 's,Also=,,g' \
+ | tr ',' '\n')
+for a in $also; do
+ $0 --root=$ROOT enable $a
+done
More information about the Openembedded-commits
mailing list