mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-07 17:19:23 +00:00
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@ossystems.com.br> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
committed by
Koen Kooi
parent
e550e77ca9
commit
2cba3b0244
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user