i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit 03832398f8ce24ff5c9c4ddf52c29b38a26d0052
parent e3ffaba058186e4e83a8e4122f58f220bfbe4bc0
Author: Raymond Li <hi@raymond.li>
Date:   Wed,  5 Aug 2020 00:57:41 -0400

Fix PAM for Arch

Diffstat:
M.gitignore | 1+
Mconfigure.ac | 13+++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -32,3 +32,4 @@ Makefile.in
 /missing
 /stamp-h1
 *.in~
+pam/i3lock
diff --git a/configure.ac b/configure.ac
@@ -77,6 +77,13 @@ AC_SEARCH_LIBS([ev_run], [ev], , [AC_MSG_FAILURE([cannot find the required ev_ru
 
 AC_SEARCH_LIBS([shm_open], [rt])
 
+# Use system-auth instead of login on Arch (TODO: Implement Gentoo as well)
+if [[ -f /etc/arch-release ]]; then
+    echo "Using PAM for Arch"
+    sed -i "s/^#auth include system-auth/auth include system-auth/g" ../pam/i3lock
+    sed -i "s/^auth include login/#auth include login/g" ../pam/i3lock
+fi
+
 # Only disable PAM on OpenBSD where i3lock uses BSD Auth instead
 case "$host" in
     *-openbsd*)
@@ -87,12 +94,6 @@ case "$host" in
     ;;
 esac
 
-# Use system-auth instead of login on Arch (TODO: Implement Gentoo as well)
-if [[ -f /etc/arch-release ]]; then
-    sed -i "s/^#auth include system-auth/auth include system-auth/g" pam/i3lock
-    sed -i "s/^auth include login/#auth include login/g" pam/i3lock
-fi
-
 AC_SEARCH_LIBS([iconv_open], [iconv], , [AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])])
 
 dnl Each prefix corresponds to a source tarball which users might have