mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-05 02:50:46 +00:00
systemd-systemctl-native: handle ALIAS tag
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
committed by
Koen Kooi
parent
7aa7241351
commit
d6408d8793
@@ -3,7 +3,7 @@ DESCRIPTION = "Wrapper to enable of systemd services"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
||||
|
||||
PR = "r4"
|
||||
PR = "r5"
|
||||
|
||||
inherit native
|
||||
|
||||
|
||||
@@ -96,6 +96,23 @@ for service in $services; do
|
||||
fi
|
||||
done
|
||||
|
||||
# create the required symbolic 'Alias' links
|
||||
alias=$(grep Alias $ROOT/$service_file \
|
||||
| sed 's,Alias=,,g' \
|
||||
| tr ',' '\n' \
|
||||
| grep '\.service$')
|
||||
|
||||
for r in $alias; do
|
||||
if [ "$action" = "enable" ]; then
|
||||
mkdir -p $ROOT/etc/systemd/system
|
||||
ln -s $service_file $ROOT/etc/systemd/system/$r
|
||||
echo "Enabled $service for $alias."
|
||||
else
|
||||
rm -f $ROOT/etc/systemd/system/$r
|
||||
echo "Disabled $service for $alias."
|
||||
fi
|
||||
done
|
||||
|
||||
# call us for the other required scripts
|
||||
also=$(grep Also $ROOT/$service_file \
|
||||
| sed 's,Also=,,g' \
|
||||
|
||||
Reference in New Issue
Block a user