I am making a script that deals with
firewall.@defaults[0]...
And I was wondering why is it called defaults[0]
Is it possible there could be firewall.@defaults[1]
What would that mean ?
Thanks
I am making a script that deals with
firewall.@defaults[0]...
And I was wondering why is it called defaults[0]
Is it possible there could be firewall.@defaults[1]
What would that mean ?
Thanks
It would basically just mean the next node, when there is one.
If you want the last node you use firewall.@defaults[-1].
But for the node type defaults there is usually only just one
.
But for firewall.@zone[x] there are more.
If you want to get one by name programatically more for developers there is a script which you can use as source in /lib/functions.sh see:
firewall4 will read all defaults sections, but will reject anything beyond the first.
thanks for this thorough answer