aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2012-09-17 10:58:08 +0000
committerEric Bénard <eric@eukrea.com>2012-12-16 10:50:25 +0100
commitd6dd53c3b69e341a1f5102d9e88bb72d07d0e33d (patch)
tree4298a0489636c684744497891acfb92e2752e350 /meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
parente5b3091351d96dcb89cec287357c67be53e46e7d (diff)
downloadmeta-openembedded-d6dd53c3b69e341a1f5102d9e88bb72d07d0e33d.tar.gz
meta-openembedded-d6dd53c3b69e341a1f5102d9e88bb72d07d0e33d.tar.bz2
meta-openembedded-d6dd53c3b69e341a1f5102d9e88bb72d07d0e33d.zip
systemd-systemctl-native: handle ALIAS tag
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Eric Bénard <eric@eukrea.com>
Diffstat (limited to 'meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl')
-rwxr-xr-xmeta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl b/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
index f74adf6c6..196e7295d 100755
--- a/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
+++ b/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
@@ -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' \