]> git.pld-linux.org Git - packages/apache1-mod_antihak.git/commitdiff
- umask in scripts, other fixes/cosmetics where needed
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 29 Dec 2002 01:44:28 +0000 (01:44 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache1-mod_antihak.spec -> 1.19

apache1-mod_antihak.spec

index 3e4c4d2f6664c416f9f2c6205476ea4cfa596106..3363bec2dbd923d6451a48783e407cff1e5a63b6 100644 (file)
@@ -16,11 +16,13 @@ BuildRequires:      apache(EAPI)-devel
 BuildRequires: libtool
 BuildRequires: mysql-devel
 BuildRequires: %{apxs}
+Requires(post,preun):  %{apxs}
+Requires(post,preun):  grep
+Requires(post,preun):  sudo
+Requires(preun):       fileutils
 Requires:      apache(EAPI) >= 1.3.1
 Requires:      iptables
 Requires:      sudo
-Prereq:                %{_sbindir}/apxs
-Prereq:                grep
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define         _libexecdir     %{_libdir}/apache
@@ -67,8 +69,11 @@ cd src
 
 install mod_antihak/mod_antihak.so $RPM_BUILD_ROOT%{_libexecdir}
 
+%clean
+rm -rf $RPM_BUILD_ROOT
+
 %post
-if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` = 0 ]; then
+if ! grep -qF "http ALL= NOPASSWD: /sbin/iptables" ; then
        echo "http ALL= NOPASSWD: /sbin/iptables" >> /etc/sudoers
 fi
 
@@ -81,8 +86,8 @@ fi
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ `fgrep "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers | wc -l` != 0 ]
-       then
+       if grep -qF "http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers ; then
+               umask 227
                grep -v '^http ALL= NOPASSWD: /sbin/iptables$' /etc/sudoers \
                        > /etc/sudoers.rpmnew-antihak
                mv -f /etc/sudoers.rpmnew-antihak /etc/sudoers
@@ -94,9 +99,6 @@ if [ "$1" = "0" ]; then
        fi
 fi
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(644,root,root,755)
 %doc src/{AUTHORS,INSTALL,ChangeLog,NEWS,TODO}
This page took 0.07325 seconds and 4 git commands to generate.