> > Is 'run', here, rhetorical?  Don't see a run option to my 
> > currently-installed shorewall(-lite)
> 
> Yes, it is. There is an (undocumented) 'call' command, but that doesn't
> allow calling functions in lib.private. lib.private is intended to be
> run out of the generated script rather than out of /sbin/shorewall*. So
> it is not loaded into those CLI programs.

So lib/private is not, directly, the solution.

I can sort-of workaround it by

        /lib.private
                some_function() {
                  /bin/sh /usr/local/sbin/shorewall_some_function.sh
                }
                load_shorewall_some_function() {
                        cat << EOF > /usr/local/sbin/shorewall_some_function.sh
                         script contents
                         etc
                         etc
                         etc
                        EOF
                }

and call

        /init
                load_shorewall_some_function

where "shorewall_some_function.sh" is, then, in-path and executable at shell

Of course, doable but messy.

It'd be very useful to have lib.private functions executable from a "shorewall 
run <scrip_name>" cmd line, where those scripts could be defined once -- in 
e.g. a shared lib.private on my cerntal, compile machine, and propoagated by 
the compile step.

Whether that's best in lib.private itself, or some other mechanism, I don't 
know.

Please consider "shorewall run foo" from lib.private a feature request.

Thanks.




------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to