x11-misc/sddm: Add ewarn for erroneous existing pambase config
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>
Sat, 30 Jan 2016 13:35:47 +0000 (14:35 +0100)
committerMichael Palimaka <kensington@gentoo.org>
Sat, 30 Jan 2016 14:22:12 +0000 (01:22 +1100)
Previous recommendation for sddm without real consolekit support breaks
modern sddm with consolekit2 support.

x11-misc/sddm/sddm-0.12.0-r1.ebuild
x11-misc/sddm/sddm-0.13.0-r1.ebuild

index 2b319152b5b281ce1a5c31be43b3a1b22baf448b..c472cbc8756ead4f5e8d3951ff87d111d9f4f407 100644 (file)
@@ -62,4 +62,18 @@ src_configure() {
 pkg_postinst() {
        enewgroup ${PN}
        enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} video
+
+       if use consolekit && use pam && [[ -e "${ROOT}"/etc/pam.d/system-login ]]; then
+               local line=$(grep "pam_ck_connector.*nox11" "${ROOT}"/etc/pam.d/system-login)
+               if [[ -z ${line} ]]; then
+                       ewarn
+                       ewarn "Erroneous /etc/pam.d/system-login settings detected!"
+                       ewarn "Please restore 'nox11' option in the line containing pam_ck_connector:"
+                       ewarn
+                       ewarn "session      optional      pam_ck_connector.so nox11"
+                       ewarn
+                       ewarn "or 'emerge -1 sys-auth/pambase' and run etc-update."
+                       ewarn
+               fi
+       fi
 }
index 7c61eb01d550c036bba3b8281915525fd7131559..8b55dfbb71d63b50de65496064677d9e7745cdd7 100644 (file)
@@ -62,4 +62,18 @@ src_configure() {
 pkg_postinst() {
        enewgroup ${PN}
        enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} video
+
+       if use consolekit && use pam && [[ -e "${ROOT}"/etc/pam.d/system-login ]]; then
+               local line=$(grep "pam_ck_connector.*nox11" "${ROOT}"/etc/pam.d/system-login)
+               if [[ -z ${line} ]]; then
+                       ewarn
+                       ewarn "Erroneous /etc/pam.d/system-login settings detected!"
+                       ewarn "Please restore 'nox11' option in the line containing pam_ck_connector:"
+                       ewarn
+                       ewarn "session      optional      pam_ck_connector.so nox11"
+                       ewarn
+                       ewarn "or 'emerge -1 sys-auth/pambase' and run etc-update."
+                       ewarn
+               fi
+       fi
 }