diff options
| author | Andreas Müller <schnitzeltony@googlemail.com> | 2012-08-07 23:04:24 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-08-08 09:07:39 +0200 |
| commit | d6408d879392f0fc9f44f6545a315a8cf6f51ebb (patch) | |
| tree | 7d7dbbee43684fdc8e9987ef7e794487cd3fe6e2 /meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl | |
| parent | 7aa72413513d85b97b1ffff0ddb3cfd3ae68a8d0 (diff) | |
| download | meta-openembedded-d6408d879392f0fc9f44f6545a315a8cf6f51ebb.tar.gz | |
systemd-systemctl-native: handle ALIAS tag
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
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 | |||
| 96 | fi | 96 | fi |
| 97 | done | 97 | done |
| 98 | 98 | ||
| 99 | # create the required symbolic 'Alias' links | ||
| 100 | alias=$(grep Alias $ROOT/$service_file \ | ||
| 101 | | sed 's,Alias=,,g' \ | ||
| 102 | | tr ',' '\n' \ | ||
| 103 | | grep '\.service$') | ||
| 104 | |||
| 105 | for r in $alias; do | ||
| 106 | if [ "$action" = "enable" ]; then | ||
| 107 | mkdir -p $ROOT/etc/systemd/system | ||
| 108 | ln -s $service_file $ROOT/etc/systemd/system/$r | ||
| 109 | echo "Enabled $service for $alias." | ||
| 110 | else | ||
| 111 | rm -f $ROOT/etc/systemd/system/$r | ||
| 112 | echo "Disabled $service for $alias." | ||
| 113 | fi | ||
| 114 | done | ||
| 115 | |||
| 99 | # call us for the other required scripts | 116 | # call us for the other required scripts |
| 100 | also=$(grep Also $ROOT/$service_file \ | 117 | also=$(grep Also $ROOT/$service_file \ |
| 101 | | sed 's,Also=,,g' \ | 118 | | sed 's,Also=,,g' \ |
