Forráskód Böngészése

fix PAM entry management

Ralf S. Engelschall 24 éve
szülő
commit
059db5ef59
2 módosított fájl, 13 hozzáadás és 5 törlés
  1. 6 2
      apache/apache.spec
  2. 7 3
      sudo/sudo.spec

+ 6 - 2
apache/apache.spec

@@ -634,12 +634,16 @@ AutoReqProv:  no
 %post
 %if "%{mod_auth_pam}" == "yes"
     #   add PAM configuration entry
-    $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "apache"
+    if [ $1 -eq 1 ]; then
+        $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "apache"
+    fi
 %endif
 
 %preun
 %if "%{mod_auth_pam}" == "yes"
     #   remove PAM configuration entry
-    $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "apache"
+    if [ $1 -eq 0 ]; then
+        $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "apache"
+    fi
 %endif
 

+ 7 - 3
sudo/sudo.spec

@@ -38,7 +38,7 @@ Distribution: OpenPKG [REL]
 Group:        System
 License:      BSD
 Version:      1.6.5p2
-Release:      20020312
+Release:      20020315
 
 #   list of sources
 Source0:      ftp://ftp.courtesan.com/pub/sudo/sudo-%{version}.tar.gz
@@ -122,12 +122,16 @@ AutoReqProv:  no
 %post
 %if "%{with_pam}" == "yes"
     #   add PAM configuration entry
-    $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "sudo"
+    if [ $1 -eq 1 ]; then
+        $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "sudo"
+    fi
 %endif
 
 %preun
 %if "%{with_pam}" == "yes"
     #   remove PAM configuration entry
-    $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "sudo"
+    if [ $1 -eq 0 ]; then
+        $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "sudo"
+    fi
 %endif