summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service16
-rw-r--r--meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb10
2 files changed, 26 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service
new file mode 100644
index 0000000000..fa64342656
--- /dev/null
+++ b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service
@@ -0,0 +1,16 @@
1[Unit]
2Description=Arp filtering arptables
3After=network.target
4Requires=network.target
5
6[Service]
7Type=oneshot
8ExecStartPre=/bin/sh -c "if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi"
9ExecStart=/bin/sh -c "/usr/sbin/arptables-restore < /etc/sysconfig/arptables"
10ExecStartPost=/bin/sh -c "touch /var/lock/subsys/arptables"
11RemainAfterExit=yes
12ExecStop=/bin/sh -c "/usr/sbin/arptables-restore < /dev/null"
13ExecStopPost=/bin/sh -c "rm -f /var/lock/subsys/arptables"
14
15[Install]
16WantedBy=multi-user.target
diff --git a/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb b/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb
index be2ac66591..f53640847a 100644
--- a/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb
+++ b/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb
@@ -13,6 +13,7 @@ SRC_URI = " \
13 file://arptables-init-busybox.patch \ 13 file://arptables-init-busybox.patch \
14 file://arptables-arpt-get-target-fix.patch \ 14 file://arptables-arpt-get-target-fix.patch \
15 file://arptables-remove-bashism.patch \ 15 file://arptables-remove-bashism.patch \
16 file://arptables.service \
16" 17"
17SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5" 18SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5"
18SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928" 19SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928"
@@ -31,3 +32,12 @@ PARALLEL_MAKEINST = "-j1"
31fakeroot do_install () { 32fakeroot do_install () {
32 oe_runmake 'BINDIR=${sbindir}' 'MANDIR=${mandir}/' 'DESTDIR=${D}' install 33 oe_runmake 'BINDIR=${sbindir}' 'MANDIR=${mandir}/' 'DESTDIR=${D}' install
33} 34}
35
36do_install_append() {
37 install -d ${D}${systemd_unitdir}/system
38 install -m 644 ${WORKDIR}/arptables.service ${D}${systemd_unitdir}/system
39}
40
41inherit systemd
42
43SYSTEMD_SERVICE_${PN} = "arptables.service"