I put iptables commands in the /jffs/scripts/firewall-start script.
Why does this script run twice at boot?
This is the script sequence after I reboot the router:
Oct 2 11:47:40 RT-N16 admin: /jffs/scripts/services-stop
Dec 31 18:00:07 0: /jffs/scripts/init-start
Dec 31 18:00:12 admin: /jffs/scripts/services-start
Dec 31 18:00:12 admin: /jffs/scripts/pre-mount
Dec 31 18:00:13 admin: /jffs/scripts/wan-start
Dec 31 18:00:14 admin: /jffs/scripts/pre-mount
Dec 31 18:00:16 admin: /jffs/scripts/firewall-start
Dec 31 18:00:16 admin: /jffs/scripts/firewall-start <--- it ran second time
Dec 31 18:00:17 admin: /jffs/scripts/post-mount
As a result of it running twice, each of my iptables commands show up twice which doesn't seem to break anything but still...
# iptables -L | grep 4500
logaccept udp -- anywhere anywhere udp dpt:4500
logaccept udp -- anywhere anywhere udp dpt:4500
So the question is why does it run twice.
Thank you.
Why does this script run twice at boot?
This is the script sequence after I reboot the router:
Oct 2 11:47:40 RT-N16 admin: /jffs/scripts/services-stop
Dec 31 18:00:07 0: /jffs/scripts/init-start
Dec 31 18:00:12 admin: /jffs/scripts/services-start
Dec 31 18:00:12 admin: /jffs/scripts/pre-mount
Dec 31 18:00:13 admin: /jffs/scripts/wan-start
Dec 31 18:00:14 admin: /jffs/scripts/pre-mount
Dec 31 18:00:16 admin: /jffs/scripts/firewall-start
Dec 31 18:00:16 admin: /jffs/scripts/firewall-start <--- it ran second time
Dec 31 18:00:17 admin: /jffs/scripts/post-mount
As a result of it running twice, each of my iptables commands show up twice which doesn't seem to break anything but still...
# iptables -L | grep 4500
logaccept udp -- anywhere anywhere udp dpt:4500
logaccept udp -- anywhere anywhere udp dpt:4500
So the question is why does it run twice.
Thank you.