services: Add systemd-specific hooks
Signed-off-by: Aleksey Avdeev <avdeev@pkcc-tb.ru>
This commit is contained in:
parent
17d9f63a58
commit
47f8d6ef1c
@ -29,11 +29,21 @@ SERVICES="$GLOBAL_DEFAULT_SERVICES_ENABLE $GLOBAL_DEFAULT_SERVICES_DISABLE"
|
||||
SERVICES="$SERVICES $GLOBAL_SERVICES_ENABLE $GLOBAL_SERVICES_DISABLE"
|
||||
SERVICES="$(echo $SERVICES | sort -u)"
|
||||
|
||||
# TODO: provide systemd-specific hooks too?
|
||||
for i in $SERVICES; do
|
||||
onoff="$(shell_config_get "$STATUS" "$i")"
|
||||
[ -n "$onoff" ] || continue
|
||||
echo "$i" >> /usr/share/install2/services-"$onoff"
|
||||
|
||||
# create systemd-specific hooks
|
||||
case "$onoff" in
|
||||
on)
|
||||
action=enabled;;
|
||||
off)
|
||||
action=disabled;;
|
||||
*)
|
||||
continue;;
|
||||
esac
|
||||
echo "$i" >> /usr/share/install2/systemd-"$action"
|
||||
done
|
||||
|
||||
rm "$STATUS"
|
||||
|
Loading…
x
Reference in New Issue
Block a user