----- Original Message -----

> From: Tom Eastep <[email protected]>
> On 10/10/2016 08:48 AM, Vieri Di Paola wrote:

>> Hi,
>> 
>> Is there a way to pass variables defined in "params" to the child 
>> processes spawned by SHELL or BEGIN SHELL?
>> 
>> I'd like to read a variable set in "params" within "SHELL".>
> Yes -- just export those variables in your 'init' extension script.


I'm not sure I understand.

# cat /etc/shorewall/init
export TEST_VAR=10.215.144.48

If I add the following to 'routes' then the condition is not met (variable is 
empty or undefined):

?BEGIN SHELL
 if [ ${#TEST_VAR} -gt 0 ]; then
 echo "main     \$TEST_VAR      -       \$IF2"
 fi
?END SHELL

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to