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