summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/iptables/iptables_1.8.3.bb
diff options
context:
space:
mode:
authorNiko Mauno <niko.mauno@iki.fi>2019-11-26 22:14:06 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-04 12:30:58 +0000
commit05b20e95e1226a703656ac56115a022d01e4b1e5 (patch)
tree02463020fa26e8dd0cb5eab84972c81bcabbbf06 /meta/recipes-extended/iptables/iptables_1.8.3.bb
parent567922d2fc7fbd0163bdafba1d6703ff296987ea (diff)
downloadpoky-05b20e95e1226a703656ac56115a022d01e4b1e5.tar.gz
iptables: Allow overriding rules file location
In some cases a distribution may want to install rules file into a location other than /etc/iptables/ so introduce custom recipe-level IPTABLES_RULES_DIR parameter which allows conveniently overriding the rules directory location. (From OE-Core rev: 64eeedcdc586c221e3684861ba85e8e4bc9c5dd1) Signed-off-by: Niko Mauno <niko.mauno@iki.fi> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/iptables/iptables_1.8.3.bb')
-rw-r--r--meta/recipes-extended/iptables/iptables_1.8.3.bb11
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/recipes-extended/iptables/iptables_1.8.3.bb b/meta/recipes-extended/iptables/iptables_1.8.3.bb
index 563c8ae354..73680207b4 100644
--- a/meta/recipes-extended/iptables/iptables_1.8.3.bb
+++ b/meta/recipes-extended/iptables/iptables_1.8.3.bb
@@ -38,14 +38,19 @@ do_configure_prepend() {
38 rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 38 rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
39} 39}
40 40
41IPTABLES_RULES_DIR ?= "${sysconfdir}/${BPN}"
42
41do_install_append() { 43do_install_append() {
42 install -d ${D}${sysconfdir}/iptables 44 install -d ${D}${IPTABLES_RULES_DIR}
43 install -m 0644 ${WORKDIR}/iptables.rules ${D}${sysconfdir}/iptables 45 install -m 0644 ${WORKDIR}/iptables.rules ${D}${IPTABLES_RULES_DIR}
44 46
45 install -d ${D}${systemd_system_unitdir} 47 install -d ${D}${systemd_system_unitdir}
46 install -m 0644 ${WORKDIR}/iptables.service ${D}${systemd_system_unitdir} 48 install -m 0644 ${WORKDIR}/iptables.service ${D}${systemd_system_unitdir}
47 49
48 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/iptables.service 50 sed -i \
51 -e 's,@SBINDIR@,${sbindir},g' \
52 -e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \
53 ${D}${systemd_system_unitdir}/iptables.service
49} 54}
50 55
51PACKAGES += "${PN}-modules" 56PACKAGES += "${PN}-modules"