meta-quanta: olympus-nuvoton: iptable: save rules while bmc rebooting

The iptable needs to be preserved in order keep the rules.

Tested: Verified for Olympus platform

Signed-off-by: Joseph Liu <kwliu@nuvoton.com>
Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: Icf01f880b5a5aa99aa89c05edf1d847e55f444d7
diff --git a/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/olympus-nuvoton-iptable-save/phosphor-save-iptable-rules.service b/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/olympus-nuvoton-iptable-save/phosphor-save-iptable-rules.service
new file mode 100644
index 0000000..9c340bd
--- /dev/null
+++ b/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