Combine Arch and Gentoo PAM config

This commit is contained in:
Raymond Li 2021-02-14 17:37:42 -05:00
parent 3ce919eedc
commit c7f8878483
No known key found for this signature in database
GPG Key ID: A014EA89B62BBB1B
1 changed files with 3 additions and 10 deletions

View File

@ -76,16 +76,9 @@ AC_SEARCH_LIBS([ev_run], [ev], , [AC_MSG_FAILURE([cannot find the required ev_ru
AC_SEARCH_LIBS([shm_open], [rt])
# Use system-local-login instead of login on Arch
if [[ -f /etc/arch-release ]]; then
echo "Using PAM for Arch"
sed -i "s/^#auth include system-local-login/auth include system-local-login/g" ../pam/i3lock
sed -i "s/^auth include login/#auth include login/g" ../pam/i3lock
fi
# Use system-local-login instead of login on Gentoo
if [[ -f /etc/gentoo-release ]]; then
echo "Using PAM for Gentoo"
# Use system-local-login instead of login on Arch and Gentoo
if [[ -f /etc/arch-release ]] || [[ -f /etc/gentoo-release ]]; then
echo "Using PAM for Arch/Gentoo"
sed -i "s/^#auth include system-local-login/auth include system-local-login/g" ../pam/i3lock
sed -i "s/^auth include login/#auth include login/g" ../pam/i3lock
fi