diff options
Diffstat (limited to 'meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl')
-rwxr-xr-x | meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl b/meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl index a5bd77085b..5c21e7f2ed 100755 --- a/meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl +++ b/meta-systemd/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' \ |