* nft script file, using include with wildcards
@ 2020-01-09 14:47 Alberto Spin
2020-01-09 15:04 ` Florian Westphal
0 siblings, 1 reply; 2+ messages in thread
From: Alberto Spin @ 2020-01-09 14:47 UTC (permalink / raw)
To: netfilter@vger.kernel.org
Hello,
I'm using nftables 0.7 (rocko branch)
I've got a nft script file that contains the following line:
# include all rule files (alphabetical order)
include "*.rules"
When I execute this script I get the following error:
./firewall.nft:25:1-18: Error: Could not open file "*.rules": No such file or directory
include "*.rules"
^^^^^^^^^^^^^^^^^^
It doesn't matter whether the are .rules present or not.
When I change the line into "include foo.rules", everything works as intended.
Why is this error generated, the documentations states:
INCLUDE FILES
....
Include statements support the usual shell wildcard symbols (*,?,[]). Having no matches for an include statement is not an error, if wildcard symbols are used in the include statement. This allows having potentially empty include directories for statements like include "/etc/firewall/rules/*". The wildcard matches are loaded in alphabetical order. Files beginning with dot (.) are not matched by include statements.
What am I missing here?
Kind Regards,
Alberto
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: nft script file, using include with wildcards
2020-01-09 14:47 nft script file, using include with wildcards Alberto Spin
@ 2020-01-09 15:04 ` Florian Westphal
0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2020-01-09 15:04 UTC (permalink / raw)
To: Alberto Spin; +Cc: netfilter@vger.kernel.org
Alberto Spin <a.spin@datawatt.nl> wrote:
> I'm using nftables 0.7 (rocko branch)
>
> I've got a nft script file that contains the following line:
>
> # include all rule files (alphabetical order)
> include "*.rules"
>
> When I execute this script I get the following error:
>
> ./firewall.nft:25:1-18: Error: Could not open file "*.rules": No such file or directory
> include "*.rules"
> ^^^^^^^^^^^^^^^^^^
Wildcard support was added in 0.8.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-09 15:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-09 14:47 nft script file, using include with wildcards Alberto Spin
2020-01-09 15:04 ` Florian Westphal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox