Remove for loop from service enablement.

This commit is contained in:
Chrysostomus 2017-02-07 07:46:06 +02:00
parent 3ebd499bf7
commit 981681bbc5

View File

@ -2262,7 +2262,7 @@ install_manjaro_de_wm() {
# enable display manager for openrc # enable display manager for openrc
if [[ "$(cat /tmp/.display-manager)" == sddm ]]; then if [[ "$(cat /tmp/.display-manager)" == sddm ]]; then
sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"sddm\"/g" /mnt/etc/conf.d/xdm sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"sddm\"/g" /mnt/etc/conf.d/xdm
arch_chroot "rc-update add xdm default" 2>/tmp/.errlog arch_chroot "rc-update add xdm default || true" 2>/tmp/.errlog
check_for_error check_for_error
set_sddm_ck set_sddm_ck
elif [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then elif [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then
@ -2276,10 +2276,8 @@ install_manjaro_de_wm() {
fi fi
else else
eval $(grep -e "enable_systemd=" $profile | sed 's/# //g') eval $(grep -e "enable_systemd=" $profile | sed 's/# //g')
echo "${enable_systemd[@]}" > /tmp/.services echo "${enable_systemd[@]}" > /mnt/tmp/.services
for service in "$(cat /tmp/.services)" ; do arch_chroot "systemctl enable $(cat /mnt/tmp/.services)"
arch_chroot "systemctl enable $service"
done
arch_chroot "systemctl disable pacman-init" arch_chroot "systemctl disable pacman-init"
# enable display manager for systemd # enable display manager for systemd
if [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then if [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then
@ -2324,7 +2322,7 @@ install_manjaro_de_wm() {
# If at least one package, install. # If at least one package, install.
if [[ $(cat ${PACKAGES}) != "" ]]; then if [[ $(cat ${PACKAGES}) != "" ]]; then
clear clear
basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog
check_for_error check_for_error
fi fi