Hi, To _generate_ rules from outside ferm, it would be good to have a hook which is executed immediately when the line is read to allow things like: @hook now "ferm-hook-create-rules"; @include "rules-created-by-ferm-hook"; I currently do this by inserting a dummy rule into a dummy chain: chain dummy interface `ferm-hook-create-rules` NOP; @include "rules-created-by-ferm-hook"; while the scripts empty output prevents any rules from being actually created. Greetings Marc
The problem is that this is not transparent to --shell. I will implement #525678 instead.
I do not understand. The hook would be executed while the shell script ie generated. That would be another possibility, yes. Greetings Marc
No. Hooks are executed when the rules are installed, not necessarily when ferm runs. With --shell, ferm just prints the hook commands, to be executed later by the generated shell script.
Hi, Can you give an example? Greetings Marc
I have understood now. This hook should be different. The use of the hook I outlined in the first bug report is addressed by @include now being able to execute commands, but this hook (@now) could probably be used to generate debug output during ferm run, or for other advanced things. Please consider implementing it nevertheless. Greetings Marc