Explorar o código

make sure PAM config is only touched on initial install and final deinstall

Ralf S. Engelschall %!s(int64=22) %!d(string=hai) anos
pai
achega
d68fd0bcc8
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      openssh/openssh.spec

+ 6 - 2
openssh/openssh.spec

@@ -265,12 +265,16 @@ AutoReqProv:  no
 
     #   add PAM configuration entry
 %if "%{with_pam}" == "yes"
-    $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=openssh
+    if [ $1 -eq 1 ]; then
+        $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=openssh
+    fi
 %endif
 
 %preun
     #   remove PAM configuration entry
 %if "%{with_pam}" == "yes"
-    $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=openssh
+    if [ $1 -eq 0 ]; then
+        $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=openssh
+    fi
 %endif