2010-05-19 01:34:49 +02:00
|
|
|
%define name shorewall-init
|
|
|
|
%define version 4.4.10
|
2010-05-28 02:21:11 +02:00
|
|
|
%define release 0RC1
|
2010-05-19 01:34:49 +02:00
|
|
|
|
2010-05-21 16:17:16 +02:00
|
|
|
Summary: Shorewall-init adds functionality to Shoreline Firewall (Shorewall).
|
2010-05-19 01:34:49 +02:00
|
|
|
Name: %{name}
|
|
|
|
Version: %{version}
|
|
|
|
Release: %{release}
|
|
|
|
License: GPLv2
|
|
|
|
Packager: Tom Eastep <teastep@shorewall.net>
|
|
|
|
Group: Networking/Utilities
|
|
|
|
Source: %{name}-%{version}.tgz
|
|
|
|
URL: http://www.shorewall.net/
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
2010-05-21 21:22:41 +02:00
|
|
|
Requires: shoreline_firewall >= 4.4.10
|
2010-05-19 01:34:49 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
|
|
The Shoreline Firewall, more commonly known as "Shorewall", is a Netfilter
|
|
|
|
(iptables) based firewall that can be used on a dedicated firewall system,
|
|
|
|
a multi-function gateway/ router/server or on a standalone GNU/Linux system.
|
|
|
|
|
|
|
|
Shorewall Init is a companion product to Shorewall that allows for tigher
|
2010-05-21 16:17:16 +02:00
|
|
|
control of connections during boot and that integrates Shorewall with
|
|
|
|
ifup/ifdown and NetworkManager.
|
2010-05-19 01:34:49 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
%setup
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
export PREFIX=$RPM_BUILD_ROOT ; \
|
|
|
|
export OWNER=`id -n -u` ; \
|
|
|
|
export GROUP=`id -n -g` ;\
|
|
|
|
./install.sh
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
if [ -x /sbin/insserv ]; then
|
|
|
|
/sbin/insserv /etc/rc.d/shorewall-init
|
|
|
|
elif [ -x /sbin/chkconfig ]; then
|
|
|
|
/sbin/chkconfig --add shorewall-init;
|
|
|
|
fi
|
2010-05-27 15:49:49 +02:00
|
|
|
fi
|
2010-05-19 01:34:49 +02:00
|
|
|
|
2010-05-27 15:49:49 +02:00
|
|
|
if [ -f /etc/SuSE-release ]; then
|
2010-05-28 19:20:19 +02:00
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-up.d/shorewall
|
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-down.d/shorewall
|
2010-05-27 15:49:49 +02:00
|
|
|
else
|
|
|
|
if [ -f /sbin/ifup-local -o -f /sbin/ifdown-local ]; then
|
|
|
|
if ! grep -q Shorewall /sbin/ifup-local || ! grep -q Shorewall /sbin/ifdown-local; then
|
2010-05-21 19:12:37 +02:00
|
|
|
echo "WARNING: /sbin/ifup-local and/or /sbin/ifdown-local already exist; ifup/ifdown events will not be handled" >&2
|
2010-05-19 01:34:49 +02:00
|
|
|
else
|
2010-05-28 19:20:19 +02:00
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /sbin/ifup-local
|
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /sbin/ifdown-local
|
2010-05-27 01:45:09 +02:00
|
|
|
fi
|
2010-05-27 15:49:49 +02:00
|
|
|
else
|
2010-05-28 19:20:19 +02:00
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /sbin/ifup-local
|
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /sbin/ifdown-local
|
2010-05-27 15:49:49 +02:00
|
|
|
fi
|
2010-05-27 01:45:09 +02:00
|
|
|
|
2010-05-27 15:49:49 +02:00
|
|
|
if [ -d /etc/NetworkManager/dispatcher.d/ ]; then
|
2010-05-28 19:20:19 +02:00
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /etc/NetworkManager/dispatcher.d/01-shorewall
|
2010-05-27 15:49:49 +02:00
|
|
|
fi
|
2010-05-19 01:34:49 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
if [ -x /sbin/insserv ]; then
|
|
|
|
/sbin/insserv -r /etc/init.d/shorewall-init
|
|
|
|
elif [ -x /sbin/chkconfig ]; then
|
|
|
|
/sbin/chkconfig --del shorewall-init
|
|
|
|
fi
|
2010-05-19 15:29:28 +02:00
|
|
|
|
2010-05-27 15:49:49 +02:00
|
|
|
[ -f /sbin/ifup-local ] && grep -q Shorewall /sbin/ifup-local && rm -f /sbin/ifup-local
|
|
|
|
[ -f /sbin/ifdown-local ] && grep -q Shorewall /sbin/ifdown-local && rm -f /sbin/ifdown-local
|
2010-05-19 15:29:28 +02:00
|
|
|
|
2010-05-24 16:46:01 +02:00
|
|
|
rm -f /etc/NetworkManager/dispatcher.d/01-shorewall
|
2010-05-19 01:34:49 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%attr(0644,root,root) %config(noreplace) /etc/sysconfig/shorewall-init
|
2010-05-23 21:53:56 +02:00
|
|
|
|
2010-05-19 01:34:49 +02:00
|
|
|
%attr(0544,root,root) /etc/init.d/shorewall-init
|
|
|
|
%attr(0755,root,root) %dir /usr/share/shorewall-init
|
|
|
|
|
|
|
|
%attr(0644,root,root) /usr/share/shorewall-init/version
|
2010-05-27 02:04:58 +02:00
|
|
|
%attr(0544,root,root) /usr/share/shorewall-init/ifupdown
|
2010-05-19 01:34:49 +02:00
|
|
|
|
|
|
|
%doc COPYING changelog.txt releasenotes.txt
|
|
|
|
|
|
|
|
%changelog
|
2010-05-28 02:21:11 +02:00
|
|
|
* Thu May 27 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0RC1
|
2010-05-27 01:47:49 +02:00
|
|
|
* Wed May 26 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0Beta4
|
2010-05-25 16:17:57 +02:00
|
|
|
* Tue May 25 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0Beta3
|
2010-05-20 23:13:38 +02:00
|
|
|
* Thu May 20 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0Beta2
|
2010-05-19 01:34:49 +02:00
|
|
|
* Tue May 18 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Initial version
|
|
|
|
|
|
|
|
|
|
|
|
|