summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/iptables/iptables/iptables.service4
-rw-r--r--meta/recipes-extended/iptables/iptables_1.8.3.bb11
2 files changed, 10 insertions, 5 deletions
diff --git a/meta/recipes-extended/iptables/iptables/iptables.service b/meta/recipes-extended/iptables/iptables/iptables.service
index 041316e457..5a8aa3f298 100644
--- a/meta/recipes-extended/iptables/iptables/iptables.service
+++ b/meta/recipes-extended/iptables/iptables/iptables.service
@@ -5,8 +5,8 @@ Wants=network-pre.target
5 5
6[Service] 6[Service]
7Type=oneshot 7Type=oneshot
8ExecStart=@SBINDIR@/iptables-restore /etc/iptables/iptables.rules 8ExecStart=@SBINDIR@/iptables-restore @RULESDIR@/iptables.rules
9ExecReload=@SBINDIR@/iptables-restore /etc/iptables/iptables.rules 9ExecReload=@SBINDIR@/iptables-restore @RULESDIR@/iptables.rules
10RemainAfterExit=yes 10RemainAfterExit=yes
11 11
12[Install] 12[Install]
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"