On 5/20/2015 9:37 PM, PGNd wrote:
> I've a function defined in
>
> SHOREWALL/lib.private
> ...
> init_ipsets4() {
> SH="/bin/sh"
> IPSET="/usr/sbin/ipset"
> ...
>
> After compile, it's available in
>
> grep init_ipsets4 firewall -A2
> init_ipsets4() {
> SH="/bin/sh"
> IPSET="/usr/sbin/ipset"
>
> The function's called in
>
> SHOREWALL/init
> ...
> init_ipsets4
>
> and executes on startup as expected.
>
> Reading
>
> http://shorewall.net/Shorewall-Lite.html
> The shorewall-lite call command allows you to to call
> interactively any Shorewall function that you can call in an extension script.
>
> with an example given
>
> EXT_IP=$(ssh root@firewall "/sbin/shorewall-lite call
> find_first_interface_address eth0")
>
> Trying on exec at command line fails
>
> shorewall-lite call init_ipsets4
> /usr/share/shorewall/lib.cli: line 4245: init_ipsets4: command
> not found
>
> The referenced line
>
> /usr/share/shorewall/lib.cli
> call)
> get_config
> [ -n "$g_debugging" ] && set -x
> #
> # Undocumented way to call functions in the libraries
> directly
> #
> shift
> 4525 $@
> ;;
> help)
>
If you want to call a function in the compiled script, you must use the
script's 'call' command. For historical reasons, the CLI 'call' function
can only call the functions from the libraries that it loads itself.-Tom -- Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________ Shorewall-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
