Commit 39b7b93f authored by Bernhard Landauer's avatar Bernhard Landauer

[util-base.sh] only enable existing services

parent ee787e9e
......@@ -36,6 +36,11 @@ enable_services() {
echo /mnt/usr/lib/systemd/system/* | xargs -n1 | cut -d/ -f7 | sed 's/.service//g' > /tmp/.available_services
grep -f /tmp/.available_services /tmp/.services > /tmp/.fix && mv /tmp/.fix /tmp/.services
arch_chroot "systemctl enable $(cat /tmp/.services)" 2>$ERR
for service in $(cat /tmp/.services); do
if [[ -e /mnt/usr/lib/systemd/system/$service ]]; then
arch_chroot "systemctl enable $service" 2>$ERR && echo "enabled service $service"
fi
done
check_for_error "enable $(cat /tmp/.services | tr '\n' ' ')" $?
arch_chroot "systemctl disable pacman-init" 2>$ERR
check_for_error "disable pacman-init" $?
......
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