Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 369548 Details for
Bug 479490
net-firewall/iptables - add systemd unit
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch adding units to the ebuild tree
0001-iptables-units.patch (text/plain), 4.27 KB, created by
Michał Górny
on 2014-02-04 17:56:56 UTC
(
hide
)
Description:
Patch adding units to the ebuild tree
Filename:
MIME Type:
Creator:
Michał Górny
Created:
2014-02-04 17:56:56 UTC
Size:
4.27 KB
patch
obsolete
>From 6482bf7a19293a2fe67a7f87edd23c045ab23b8f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> >Date: Tue, 4 Feb 2014 18:05:42 +0100 >Subject: [PATCH] iptables units > >--- > .../iptables/files/systemd/ip6tables-restore.service | 12 ++++++++++++ > net-firewall/iptables/files/systemd/ip6tables-store.service | 10 ++++++++++ > net-firewall/iptables/files/systemd/iptables-restore.service | 12 ++++++++++++ > net-firewall/iptables/files/systemd/iptables-store.service | 10 ++++++++++ > net-firewall/iptables/iptables-1.4.21.ebuild | 11 ++++++++++- > 5 files changed, 54 insertions(+), 1 deletion(-) > create mode 100644 net-firewall/iptables/files/systemd/ip6tables-restore.service > create mode 100644 net-firewall/iptables/files/systemd/ip6tables-store.service > create mode 100644 net-firewall/iptables/files/systemd/iptables-restore.service > create mode 100644 net-firewall/iptables/files/systemd/iptables-store.service > >diff --git a/net-firewall/iptables/files/systemd/ip6tables-restore.service b/net-firewall/iptables/files/systemd/ip6tables-restore.service >new file mode 100644 >index 0000000..343f172 >--- /dev/null >+++ b/net-firewall/iptables/files/systemd/ip6tables-restore.service >@@ -0,0 +1,12 @@ >+[Unit] >+Description=Restore ip6tables firewall rules >+# if both are queued for some reason, don't store before restoring :) >+Before=ip6tables-store.service >+Conflicts=shutdown.target >+ >+[Service] >+Type=oneshot >+ExecStart=/sbin/ip6tables-restore /var/lib/ip6tables/rules-save >+ >+[Install] >+WantedBy=basic.target >diff --git a/net-firewall/iptables/files/systemd/ip6tables-store.service b/net-firewall/iptables/files/systemd/ip6tables-store.service >new file mode 100644 >index 0000000..b4225e8 >--- /dev/null >+++ b/net-firewall/iptables/files/systemd/ip6tables-store.service >@@ -0,0 +1,10 @@ >+[Unit] >+Description=Store ip6tables firewall rules >+Before=shutdown.target >+ >+[Service] >+Type=oneshot >+ExecStart=/bin/sh -c "/sbin/ip6tables-save --counters > /var/lib/ip6tables/rules-save" >+ >+[Install] >+WantedBy=shutdown.target >diff --git a/net-firewall/iptables/files/systemd/iptables-restore.service b/net-firewall/iptables/files/systemd/iptables-restore.service >new file mode 100644 >index 0000000..f8456a1 >--- /dev/null >+++ b/net-firewall/iptables/files/systemd/iptables-restore.service >@@ -0,0 +1,12 @@ >+[Unit] >+Description=Restore iptables firewall rules >+# if both are queued for some reason, don't store before restoring :) >+Before=iptables-store.service >+Conflicts=shutdown.target >+ >+[Service] >+Type=oneshot >+ExecStart=/sbin/iptables-restore /var/lib/iptables/rules-save >+ >+[Install] >+WantedBy=basic.target >diff --git a/net-firewall/iptables/files/systemd/iptables-store.service b/net-firewall/iptables/files/systemd/iptables-store.service >new file mode 100644 >index 0000000..e2b6cca >--- /dev/null >+++ b/net-firewall/iptables/files/systemd/iptables-store.service >@@ -0,0 +1,10 @@ >+[Unit] >+Description=Store iptables firewall rules >+Before=shutdown.target >+ >+[Service] >+Type=oneshot >+ExecStart=/bin/sh -c "/sbin/iptables-save --counters > /var/lib/iptables/rules-save" >+ >+[Install] >+WantedBy=shutdown.target >diff --git a/net-firewall/iptables/iptables-1.4.21.ebuild b/net-firewall/iptables/iptables-1.4.21.ebuild >index 17234eb..94d77f3 100644 >--- a/net-firewall/iptables/iptables-1.4.21.ebuild >+++ b/net-firewall/iptables/iptables-1.4.21.ebuild >@@ -7,7 +7,7 @@ EAPI="5" > # Force users doing their own patches to install their own tools > AUTOTOOLS_AUTO_DEPEND=no > >-inherit eutils multilib toolchain-funcs autotools >+inherit eutils multilib systemd toolchain-funcs autotools > > DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" > HOMEPAGE="http://www.netfilter.org/projects/iptables/" >@@ -80,6 +80,15 @@ src_install() { > newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables > fi > >+ systemd_dounit "${FILESDIR}"/systemd/iptables-{re,}store.service >+ systemd_enable_service shutdown.target iptables-store.service >+ systemd_enable_service basic.target iptables-restore.service >+ if use ipv6 ; then >+ systemd_dounit "${FILESDIR}"/systemd/ip6tables-{re,}store.service >+ systemd_enable_service shutdown.target ip6tables-store.service >+ systemd_enable_service basic.target ip6tables-restore.service >+ fi >+ > # Move important libs to /lib > gen_usr_ldscript -a ip{4,6}tc iptc xtables > >-- >1.8.5.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 479490
:
354982
|
354984
|
355276
|
355278
|
366492
|
366494
|
366496
|
366536
|
366556
|
366558
|
366616
|
366618
|
366628
|
366632
|
367550
|
367552
|
367736
|
367810
|
369384
| 369548 |
379124
|
403168
|
403348