diff options
| -rw-r--r-- | meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables.service | 16 | ||||
| -rw-r--r-- | meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb | 10 |
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] | ||
| 2 | Description=Arp filtering arptables | ||
| 3 | After=network.target | ||
| 4 | Requires=network.target | ||
| 5 | |||
| 6 | [Service] | ||
| 7 | Type=oneshot | ||
| 8 | ExecStartPre=/bin/sh -c "if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi" | ||
| 9 | ExecStart=/bin/sh -c "/usr/sbin/arptables-restore < /etc/sysconfig/arptables" | ||
| 10 | ExecStartPost=/bin/sh -c "touch /var/lock/subsys/arptables" | ||
| 11 | RemainAfterExit=yes | ||
| 12 | ExecStop=/bin/sh -c "/usr/sbin/arptables-restore < /dev/null" | ||
| 13 | ExecStopPost=/bin/sh -c "rm -f /var/lock/subsys/arptables" | ||
| 14 | |||
| 15 | [Install] | ||
| 16 | WantedBy=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 | " |
| 17 | SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5" | 18 | SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5" |
| 18 | SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928" | 19 | SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928" |
| @@ -31,3 +32,12 @@ PARALLEL_MAKEINST = "-j1" | |||
| 31 | fakeroot do_install () { | 32 | fakeroot 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 | |||
| 36 | do_install_append() { | ||
| 37 | install -d ${D}${systemd_unitdir}/system | ||
| 38 | install -m 644 ${WORKDIR}/arptables.service ${D}${systemd_unitdir}/system | ||
| 39 | } | ||
| 40 | |||
| 41 | inherit systemd | ||
| 42 | |||
| 43 | SYSTEMD_SERVICE_${PN} = "arptables.service" | ||
