]>
Commit | Line | Data |
---|---|---|
b0908da3 | 1 | Summary: Firewall SysV-init style start-up script |
2 | Name: firewall-init | |
3 | Version: 1.2 | |
4 | Release: 6 | |
5 | Copyright: BSD | |
6 | Group: Networking/Admin | |
7 | Source: ftp://ftp.redhat.com/pub/home/bandregg/%{name}-%{version}.tar.gz | |
8 | Patch0: firewall-init.patch | |
9 | Patch1: firewall-chkconfig.patch | |
10 | Prereq: /sbin/chkconfig | |
11 | Requires: ipfwadm | |
12 | Buildarch: noarch | |
2bb537a8 | 13 | BuildRoot: /tmp/%{name}-%{version}-root |
b0908da3 | 14 | |
15 | %description | |
16 | Firewall-init is meant to provide an easy to use interface to start and | |
17 | stopping the kernel IP packet filters and accounting through ipfwadm(8). | |
18 | ||
19 | %prep | |
20 | %setup -q | |
21 | %patch0 -p1 | |
22 | %patch1 -p1 | |
23 | ||
24 | %install | |
25 | rm -rf $RPM_BUILD_ROOT | |
26 | install -d $RPM_BUILD_ROOT/etc/{sysconfig/firewall-rules,rc.d/{init,rc{0,1,2,3,4,5,6}}.d} | |
27 | install firewall $RPM_BUILD_ROOT/etc/sysconfig/ | |
28 | for i in input output forward; do | |
29 | echo '#<policy> <proto> <s_addr/s_mask> <s_port> <d_addr/d_mask> <d_port> <options>' > \ | |
30 | $RPM_BUILD_ROOT/etc/sysconfig/firewall-rules/${i} | |
31 | done | |
32 | echo '#<direction> <proto> <s_addr/s_mask> <s_port> <d_addr/d_mask> <d_port> <options>' > \ | |
33 | $RPM_BUILD_ROOT/etc/sysconfig/firewall-rules/account | |
34 | install firewall.init $RPM_BUILD_ROOT/etc/rc.d/init.d/firewall | |
35 | ||
36 | %post | |
37 | /sbin/chkconfig --add firewall | |
38 | ||
39 | %postun | |
40 | if [ $1 = 0 ]; then | |
41 | /sbin/chkconfig --del firewall | |
42 | fi | |
43 | ||
44 | %clean | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | ||
47 | %files | |
b865a705 | 48 | %defattr(644,root,root,755) |
b0908da3 | 49 | %doc README input.example |
b865a705 | 50 | %attr(600,root,root) %verify(not size mtime md5) %config(noreplace) /etc/sysconfig/firewall |
51 | %attr(600,root,root) %verify(not size mtime md5) %config(noreplace) /etc/sysconfig/firewall-rules/* | |
52 | %attr(700,root,root) %dir /etc/sysconfig/firewall-rules | |
53 | %attr(700,root,root) /etc/rc.d/init.d/firewall | |
b0908da3 | 54 | |
55 | %changelog | |
56 |