Explorar o código

add pam entry management

Ralf S. Engelschall %!s(int64=24) %!d(string=hai) anos
pai
achega
6b5c8402e8
Modificáronse 1 ficheiros con 16 adicións e 0 borrados
  1. 16 0
      pureftpd/pureftpd.spec

+ 16 - 0
pureftpd/pureftpd.spec

@@ -107,3 +107,19 @@ AutoReqProv:  no
 %clean
     rm -rf $RPM_BUILD_ROOT
 
+%post
+%if "%{with_pam}" == "yes"
+    #   add PAM configuration entry
+    if [ $1 -eq 1 ]; then
+        $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "pureftpd"
+    fi
+%endif
+
+%preun
+%if "%{with_pam}" == "yes"
+    #   remove PAM configuration entry
+    if [ $1 -eq 0 ]; then
+        $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "pureftpd"
+    fi
+%endif
+