diff options
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/iptables/iptables/iptables.service | 4 | ||||
-rw-r--r-- | meta/recipes-extended/iptables/iptables_1.8.3.bb | 11 |
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] |
7 | Type=oneshot | 7 | Type=oneshot |
8 | ExecStart=@SBINDIR@/iptables-restore /etc/iptables/iptables.rules | 8 | ExecStart=@SBINDIR@/iptables-restore @RULESDIR@/iptables.rules |
9 | ExecReload=@SBINDIR@/iptables-restore /etc/iptables/iptables.rules | 9 | ExecReload=@SBINDIR@/iptables-restore @RULESDIR@/iptables.rules |
10 | RemainAfterExit=yes | 10 | RemainAfterExit=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 | ||
41 | IPTABLES_RULES_DIR ?= "${sysconfdir}/${BPN}" | ||
42 | |||
41 | do_install_append() { | 43 | do_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 | ||
51 | PACKAGES += "${PN}-modules" | 56 | PACKAGES += "${PN}-modules" |