summaryrefslogtreecommitdiffstats
path: root/rules/nftables.make
diff options
context:
space:
mode:
authorBaeuerle, Florian <Florian.Baeuerle@allegion.com>2019-04-03 14:12:04 +0000
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-04-05 16:29:40 +0200
commit85758bda0d61ab6a103efa27427df14471be0713 (patch)
tree297f888a03d962719ca4d1ce20ef5b80470c11fc /rules/nftables.make
parentb8202ddcf19a197b2f96a8f2cd6ffb843b98811c (diff)
downloadptxdist-85758bda0d61ab6a103efa27427df14471be0713.tar.gz
ptxdist-85758bda0d61ab6a103efa27427df14471be0713.tar.xz
nftables: add option for installing systemd unit
Allow installing a systemd unit for loading the nftables configuration file. The systemd unit is taken from Arch Linux. Signed-off-by: Florian Bäuerle <florian.baeuerle@allegion.com> Acked-by: Alexander Dahl <post@lespocky.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/nftables.make')
-rw-r--r--rules/nftables.make6
1 files changed, 6 insertions, 0 deletions
diff --git a/rules/nftables.make b/rules/nftables.make
index 4a95694ad..15368f965 100644
--- a/rules/nftables.make
+++ b/rules/nftables.make
@@ -69,6 +69,12 @@ endif
endif
endif
+ifdef PTXCONF_NFTABLES_SYSTEMD_UNIT
+ @$(call install_alternative, nftables, 0, 0, 0644, /usr/lib/systemd/system/nftables.service)
+ @$(call install_link, nftables, ../nftables.service, \
+ /usr/lib/systemd/system/multi-user.target.wants/nftables.service)
+endif
+
@$(call install_finish, nftables)
@$(call touch)