diff options
Diffstat (limited to 'meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network')
4 files changed, 44 insertions, 0 deletions
diff --git a/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/files/config.txt b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/files/config.txt new file mode 100644 index 000000000..695356c19 --- /dev/null +++ b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/files/config.txt @@ -0,0 +1,4 @@ +fruBusNum=13 +fruAddr=0x51 +numberMac=1 +mac1=eth1 diff --git a/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/mac-address_%.bbappend b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/mac-address_%.bbappend new file mode 100644 index 000000000..a9f0c407a --- /dev/null +++ b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/mac-address_%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend_olympus-nuvoton := "${THISDIR}/files:" + +SRC_URI_append_olympus-nuvoton = " file://config.txt" + +FILES_${PN}_append_olympus-nuvoton = " ${datadir}/mac-address/config.txt" + +do_install_append_olympus-nuvoton() { + install -d ${D}${datadir}/mac-address + install -m 0644 -D ${WORKDIR}/config.txt \ + ${D}${datadir}/mac-address/config.txt +} diff --git a/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/olympus-nuvoton-iptable-save.bb b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/olympus-nuvoton-iptable-save.bb new file mode 100644 index 000000000..2416ef932 --- /dev/null +++ b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/olympus-nuvoton-iptable-save.bb @@ -0,0 +1,17 @@ +SUMMARY = "Iptable Save" +DESCRIPTION = "Save iptable rules" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit allarch systemd + +SRC_URI = "file://phosphor-save-iptable-rules.service" +SYSTEMD_SERVICE_${PN} = "phosphor-save-iptable-rules.service" + +S = "${WORKDIR}" +do_install() { + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/phosphor-save-iptable-rules.service \ + ${D}${systemd_unitdir}/system +} diff --git a/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/olympus-nuvoton-iptable-save/phosphor-save-iptable-rules.service b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/olympus-nuvoton-iptable-save/phosphor-save-iptable-rules.service new file mode 100644 index 000000000..9c340bd48 --- /dev/null +++ b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/olympus-nuvoton-iptable-save/phosphor-save-iptable-rules.service @@ -0,0 +1,12 @@ +[Unit] +Description=Save iptable rules +DefaultDependencies=no +After=shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=/bin/sh -c "iptables-save > /etc/iptables/iptables.rules" + +[Install] +WantedBy=shutdown.target |