Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:danci1973
iptables-init
iptables-init.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File iptables-init.spec of Package iptables-init
# # spec file for package iptables-init ## %if 0%{?suse_version} > 1210 %bcond_without systemd %endif %define srvc_name iptables %if ! %{defined _fillupdir} %define _fillupdir /var/adm/fillup-templates %endif Name: iptables-init Summary: A simple script to manage iptables rules from a save file License: GPL Group: System Environment/Security Version: 0.2 Release: 1 Url: http://www.netfilter.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %if %{with systemd} PreReq: %fillup_prereq %else PreReq: %insserv_prereq %fillup_prereq %endif Source0: iptables.init Source1: iptables.sysconfig Source2: iptables.service Source3: rules-save %if %{with systemd} BuildRequires: systemd %endif %if %{with systemd} %{?systemd_requires} %endif %description A simple script and unit file to manage iptables rules from a save file. %prep %build %install mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/ mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_fillupdir} mkdir -p %{buildroot}%{_sysconfdir}/iptables install -D -m 0644 %{SOURCE1} %{buildroot}%{_fillupdir}/sysconfig.%{srvc_name} install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/iptables %if %{with systemd} install -D -m 0755 %{SOURCE0} %{buildroot}%{_sbindir} install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir} ln -sf /usr/sbin/service %{buildroot}/usr/sbin/rciptables %else install -D -m 0755 %{SOURCE0} %{buildroot}%{_sysconfdir}/init.d/%{srvc_name} ln -sf ../../etc/init.d/%{srvc_name} %{buildroot}/usr/sbin/rciptables %endif %pre %if %{with systemd} %service_add_pre %{srvc_name}.service %endif %post %if %{with systemd} %fillup_and_insserv -i -n iptables %service_add_post %{srvc_name}.service %else %{fillup_and_insserv iptables} %endif %preun %stop_on_removal %{srvc_name} %if %{with systemd} %service_del_preun %{srvc_name}.service %endif %postun %if %{with systemd} %service_del_postun %{srvc_name}.service %endif %files %defattr(-,root,root) %dir %{_sysconfdir}/iptables %dir %{_fillupdir} %config(noreplace) %{_sysconfdir}/iptables/rules-save %{_fillupdir}/sysconfig.%{srvc_name} %if %{with systemd} %{_sbindir}/iptables.init %{_unitdir}/iptables.service %else %{_sysconfdir}/init.d/%{srvc_name} %endif %{_sbindir}/rciptables %changelog * Wed Feb 28 2018 danci@agenda.si - initial version - added a check for errors in iptables
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor