On 5/21/2015 8:48 AM, PGNd wrote: >>> Can you pls provide a CLI usage example of how to call /execute the >>> "init_ipsets4" that's defined in lib.private? >>> >> /var/lib/shorewall-lite/firewall call foo > fails on exec, > > /var/lib/shorewall-lite/firewall call init_ipsets4 > Usage: /var/lib/shorewall-lite/firewall [ options ] <command> Oops -- guess I haven't implemented 'call' in the compiled program. Lightly-tested patch attached.
-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 \________________________________________________
diff --git a/Shorewall/Perl/prog.footer b/Shorewall/Perl/prog.footer
index b468fb4..3c62c2d 100644
--- a/Shorewall/Perl/prog.footer
+++ b/Shorewall/Perl/prog.footer
@@ -22,6 +22,7 @@ usage() {
echo " status"
echo " up <interface>"
echo " savesets <file>"
+ echo " call <function> [ <parameter> ... ]"
echo " version"
echo
echo "Options are:"
@@ -426,6 +427,14 @@ case "$COMMAND" in
usage 2
fi
;;
+ call)
+ #
+ # Undocumented way to call functions in the libraries directly
+ #
+ detect_configuration
+ shift
+ $@
+ ;;
version)
[ $# -ne 1 ] && usage 2
echo $SHOREWALL_VERSION
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
