Commit cb82f538 authored by udeved's avatar udeved

prepare for elogind on openrc

parent 45df1756
......@@ -5,11 +5,11 @@
USENONFREE="$(kernel_cmdline nonfree no)"
MODULES_DIR='/etc/calamares/modules'
echo "Setting MHWD nonfree driver: ${USENONFREE} ..." >> /var/log/mhwd-live-net.log
echo "Setting MHWD nonfree driver: ${USENONFREE} ..." >> /var/log/mhwd-live.log
if [[ "${USENONFREE}" == "yes" ]] || [[ "${USENONFREE}" == "true" ]]; then
sed -e "s|^.*driver:.*|driver: nonfree|" -i "${MODULES_DIR}/mhwdcfg.conf"
else
sed -e "s|^.*driver:.*|driver: free|" -i "${MODULES_DIR}/mhwdcfg.conf"
fi
echo "MHWD DONE" >> /var/log/mhwd-live-net.log
echo "MHWD DONE" >> /var/log/mhwd-live.log
......@@ -110,10 +110,6 @@ configure_accountsservice(){
fi
}
set_sddm_elogind(){
gpasswd -a sddm video &> /dev/null
}
set_lightdm_greeter(){
local greeters=$(ls /usr/share/xgreeters/*greeter.desktop) name
for g in ${greeters[@]};do
......@@ -128,11 +124,20 @@ set_sddm_elogind(){
done
}
set_lightdm_elogind(){
set_lightdm_vt(){
sed -i -e 's/^.*minimum-vt=.*/minimum-vt=7/' /etc/lightdm/lightdm.conf
sed -i -e 's/pam_systemd.so/pam_elogind.so/' /etc/pam.d/lightdm-greeter
}
# set_sddm_elogind(){
# gpasswd -a sddm video &> /dev/null
# }
set_pam(){
for conf in /etc/pam.d/*;do
sed -e 's|systemd.so|elogind.so|g' -i $conf
done
}
configure_samba(){
if [[ -f /usr/bin/samba ]];then
local conf=/etc/samba/smb.conf
......@@ -146,7 +151,7 @@ configure_displaymanager(){
# Configure display manager
if [[ -f /usr/bin/lightdm ]];then
groupadd -r autologin
[[ -d /run/openrc ]] && set_lightdm_elogind
[[ -d /run/openrc ]] && set_lightdm_vt
set_lightdm_greeter
if $(is_valid_de); then
sed -i -e "s/^.*user-session=.*/user-session=$default_desktop_file/" /etc/lightdm/lightdm.conf
......@@ -167,7 +172,6 @@ configure_displaymanager(){
sed -i "s|default.desktop|$default_desktop_file.desktop|g" /etc/mdm/custom.conf
fi
elif [[ -f /usr/bin/sddm ]];then
[[ -d /run/openrc ]] && set_sddm_elogind
if $(is_valid_de); then
sed -i -e "s|^Session=.*|Session=$default_desktop_file.desktop|" /etc/sddm.conf
fi
......@@ -182,6 +186,7 @@ configure_displaymanager(){
sed -i -e "s/^.*autologin=.*/autologin=${username}/" /etc/lxdm/lxdm.conf
fi
fi
[[ -d /run/openrc ]] && set_pam
}
gen_pw(){
......
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