]>
Commit | Line | Data |
---|---|---|
c06ac4ec | 1 | %define _name firewall-init |
f5a6c7f8 | 2 | Summary: ipchains firewall SysV-init style start-up script |
d1c4742b | 3 | Summary(pl.UTF-8): Skrypt startowy firewalla ipchains |
50acd5b2 | 4 | Name: %{_name}-ipchains |
f5a6c7f8 | 5 | Version: 2.1 |
07782dc4 | 6 | Release: 5 |
f5a6c7f8 | 7 | License: BSD |
2169e207 | 8 | Group: Networking/Admin |
50acd5b2 | 9 | Source0: %{_name}-%{version}.tar.gz |
f5a6c7f8 | 10 | # Source0-md5: 07ba7a897e2d903d629e6607e3b495f3 |
50acd5b2 | 11 | Patch0: %{_name}-syntax_verify.patch |
c06ac4ec | 12 | Requires(post,preun): /sbin/chkconfig |
f5a6c7f8 | 13 | Requires: ipchains |
bda0822d | 14 | Requires: rc-scripts |
f5a6c7f8 | 15 | Obsoletes: firewall-init < 2.2 |
16 | Conflicts: firewall-init >= 2.99 | |
17 | Buildarch: noarch | |
994730d9 | 18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
b0908da3 | 19 | |
20 | %description | |
f5a6c7f8 | 21 | Firewall-init is meant to provide an easy to use interface to start |
22 | and stopping the kernel IP packet filters and accounting through | |
23 | ipchains(8). | |
b0908da3 | 24 | |
d1c4742b JR |
25 | %description -l pl.UTF-8 |
26 | Dzięki firewall-init uzyskuje się łatwy interfejs do startowania i | |
27 | stopowania filtrów IP jądra oraz zliczania pakietów poprzez | |
f5a6c7f8 | 28 | ipchains(8). |
c090d728 | 29 | |
b0908da3 | 30 | %prep |
50acd5b2 | 31 | %setup -q -n %{_name}-%{version} |
23c6799b | 32 | %patch0 -p1 |
b0908da3 | 33 | |
34 | %install | |
35 | rm -rf $RPM_BUILD_ROOT | |
f5a6c7f8 | 36 | install -d $RPM_BUILD_ROOT/etc/{sysconfig/firewall-rules,rc.d/init.d} |
2169e207 | 37 | |
f5a6c7f8 | 38 | install firewall.init $RPM_BUILD_ROOT/etc/rc.d/init.d/firewall |
39 | install firewall $RPM_BUILD_ROOT/etc/sysconfig/ | |
93d460f0 | 40 | |
f5a6c7f8 | 41 | for i in input output forward; do |
42 | echo '#<policy> <proto> <s_addr/s_mask> <s_port> <d_addr/d_mask> <d_port> <interface> <options>' > \ | |
43 | $RPM_BUILD_ROOT/etc/sysconfig/firewall-rules/${i} | |
44 | done | |
2169e207 | 45 | |
b0908da3 | 46 | %post |
391cfe7c | 47 | /sbin/chkconfig --add firewall |
b0908da3 | 48 | |
391cfe7c | 49 | %postun |
50 | if [ "$1" = "0" ]; then | |
51 | /sbin/chkconfig --del firewall | |
52 | fi | |
b0908da3 | 53 | |
f5a6c7f8 | 54 | %clean |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
b0908da3 | 57 | %files |
cff087f8 | 58 | %defattr(644,root,root,755) |
f5a6c7f8 | 59 | %doc README input.example |
bda0822d ER |
60 | %attr(600,root,root) %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/firewall |
61 | %attr(600,root,root) %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/firewall-rules/* | |
f5a6c7f8 | 62 | %attr(700,root,root) %dir /etc/sysconfig/firewall-rules |
63 | %attr(754,root,root) /etc/rc.d/init.d/firewall |