Skip to contentSkip to conversation

Add systemd files

PATCH NAK Sébastien Luttringer 2 participants 2 messages Mar 21, 2016 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add systemd files

This is the current systemd service files I wrote for Arch Linux. A Fedora maintainer suggest to move them to the upstream to share them between distribution.

---
 configure.ac                   |  1 +
 files/Makefile.am              |  2 +-
 files/systemd/Makefile.am      |  1 +
 files/systemd/nftables-reload  |  3 +++
 files/systemd/nftables.service | 15 +++++++++++++++
 5 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 files/systemd/Makefile.am
 create mode 100755 files/systemd/nftables-reload
 create mode 100644 files/systemd/nftables.service
configure.ac +1 -0
index 0d7e6ed..c763d0f 100644
@@ -129,6 +129,7 @@ AC_CONFIG_FILES([					\
 		doc/Makefile				\
 		files/Makefile				\
 		files/nftables/Makefile			\
+		files/systemd/Makefile			\
 		])
 AC_OUTPUT
 
files/Makefile.am +1 -1
index a8394c0..00b27db 100644
@@ -1 +1 @@
-SUBDIRS = nftables
+SUBDIRS = nftables systemd
files/systemd/Makefile.am new file +1 -0
new file mode 100644
index 0000000..3392fe9
@@ -0,0 +1 @@
+EXTRA_DIST = nftables.service nftables-reload
files/systemd/nftables-reload new file +3 -0
new file mode 100755
index 0000000..1c41569
@@ -0,0 +1,3 @@
+#!/usr/bin/nft -f
+flush ruleset
+include "/etc/nftables.conf"
files/systemd/nftables.service new file +15 -0
new file mode 100644
index 0000000..d9b9cc4
@@ -0,0 +1,15 @@
+[Unit]
+Description=Netfilter Tables
+Documentation=man:nft(8)
+Wants=network-pre.target
+Before=network-pre.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/nft -f /etc/nftables.conf
+ExecReload=/usr/bin/nft -f /usr/lib/systemd/scripts/nftables-reload
+ExecStop=/usr/bin/nft flush ruleset
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
2.7.4
#1 lore raw
Quoted 13 lines · Sébastien Luttringer

This is the current systemd service files I wrote for Arch Linux. A Fedora maintainer suggest to move them to the upstream to share them between distribution.

---
 configure.ac                   |  1 +
 files/Makefile.am              |  2 +-
 files/systemd/Makefile.am      |  1 +
 files/systemd/nftables-reload  |  3 +++
 files/systemd/nftables.service | 15 +++++++++++++++
 5 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 files/systemd/Makefile.am
 create mode 100755 files/systemd/nftables-reload
 create mode 100644 files/systemd/nftables.service

NACK.

This has been discussed many times already.

Signature · 5 lines
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html