Commit 0112879c authored by Michael Shigorin's avatar Michael Shigorin

services: optimize loop

No use to distinguish between "on" and "off" each iteration when the resulting files with differing names should end up identical.
parent 572ba277
......@@ -33,19 +33,11 @@ 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
cp -a /usr/share/install2/{services-on,systemd-enabled}
cp -a /usr/share/install2/{services-off,systemd-disabled}
rm "$STATUS"
:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment