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:
Andreas Müller
2012-08-07 23:04:24 +00:00
committed by Koen Kooi
parent 7aa7241351
commit d6408d8793
2 changed files with 18 additions and 1 deletions
@@ -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' \