Changes of Revision 9
[-] | Changed | blocksshd.spec |
x 1
2 Source2: blocksshd.sysconfig 3 Patch0: blocksshd-1.1.diff 4 Patch1: blocksshd-suse-config.diff 5 +Patch2: blocksshd-redhat-config.diff 6 +Patch3: blocksshd-redhat-init.diff 7 8 Requires: perl >= 5, /sbin/chkconfig 9 + 10 %if 0%{?suse_version} 11 +Requires: whois 12 +%endif 13 +%if 0%{?centos_version} || 0%{?fedora_version} 14 +Requires: jwhois 15 +%endif 16 + 17 Requires: perl-Net-Subnets 18 Requires: perl-File-Tail 19 Requires: perl-Net-DNS 20 -Requires: whois 21 Requires: iptables 22 Requires: sed 23 Requires: mailx 24 -%endif 25 26 AutoReq: no 27 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root 28
29 %patch1 -p1 30 %endif 31 32 +%if 0%{?centos_version} || 0%{?fedora_version} 33 +%patch2 -p1 34 +%patch3 -p1 35 +%endif 36 + 37 %build 38 %{__make} 39 40
41 %else 42 %{__make} init DESTDIR="%{buildroot}" \ 43 INITRDDIR="%{_initrddir}" 44 +install -m 644 %{S:2} %{buildroot}/etc/sysconfig/blocksshd 45 %endif 46 47 %clean 48
49 %{_mandir}/man1/blocksshd.1* 50 %{_initrddir}/blocksshd 51 %config(noreplace) %{_sysconfdir}/blocksshd.conf 52 -%if 0%{?suse_version} 53 %config(noreplace) %{_sysconfdir}/sysconfig/blocksshd 54 -%endif 55 56 %post 57 /sbin/chkconfig --add blocksshd 58
59 /sbin/chkconfig --add blocksshd 60 61 %changelog 62 +* Tue Jan 22 2008 Carsten Schoene <cs@linux-administrator.com> 63 +- added more requirements 64 +- added configuration patch & sysconfig for redhat based systems 65 + 66 * Mon Jan 21 2008 Carsten Schoene <cs@linux-administrator.com> 67 - adapted spec to SuSE distributions 68 - added SuSE init script and configuration patch 69 |
||
[+] | Added | blocksshd-redhat-config.diff ^ |
@@ -0,0 +1,11 @@ +--- blocksshd-1.1/blocksshd.conf.orig 2008-01-21 16:58:44.000000000 +0100 ++++ blocksshd-1.1/blocksshd.conf 2008-01-22 12:42:45.000000000 +0100 +@@ -10,7 +10,7 @@ + unblock => '1', # Enable unblocking + unblock_timeout => '43200', # Time in seconds after which to unblock a blocked IP address + restore_blocked => '0', # Turn on checking for previously blocked IPs +- log_ips => '/usr/local/etc/blocksshd.list', # Log file for blocked IPs ++ log_ips => '/var/log/blocksshd.list', # Log file for blocked IPs + pid_file => '/var/run/blocksshd.pid', # Location of PID file + send_email => '1', # Enable the sending of email notifications + email => 'root', # Email address to send notifications | ||
[+] | Added | blocksshd-redhat-init.diff ^ |
@@ -0,0 +1,18 @@ +--- blocksshd-1.1/init/blocksshd.orig 2008-01-22 12:45:13.000000000 +0100 ++++ blocksshd-1.1/init/blocksshd 2008-01-22 12:46:03.000000000 +0100 +@@ -30,6 +30,7 @@ + RETVAL=$? + echo + [ $RETVAL = 0 ] && touch /var/lock/subsys/blocksshd ++ $STARTCMD + return $RETVAL + ;; + stop) +@@ -39,6 +40,7 @@ + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f /var/lock/subsys/blocksshd ++ $STOPCMD + ;; + reload) + $0 stop |