On 7/2/2015 9:54 AM, Eddie wrote:
> On 7/1/2015 8:47 PM, Tom Eastep wrote:
>> On 7/1/2015 11:12 AM, Eddie wrote:
>>> OK, I see now what it's trying to do.  :-(
>>>
>>> But this only fails when the script is run by OpenVPN.  Running the same
>>> script on a command line works.
>> Okay -- the problem is that the PATH setting when you execute
>> /usr/sbin/shorewall doesn't include the directory containing lsmod. I
>> can release a fix that adopts the setting of PATH from
>> /etc/shorewall/shorewall.conf in the compiler when it isn't being
>> executed to generate an exported script. But in the meantime, if you
>> modify your script to set PATH properly, that will work around your issue.
>>
>> -Tom
> I added this ahead of the call to shorewall:
>
> PATH=/sbin:$PATH
>
> Verified it by echo'ing PATH to a file.  But it still fails with the 
> same error.
Please apply the attached patch to the Shorewall Config.pm module and
see if that corrects the problem.

       patch /path/to/Shorewall/Config.pm < PATH.patch

Thanks,
-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/Shorewall/Config.pm 
b/Shorewall/Perl/Shorewall/Config.pm
index 145a8ac..6dab84a 100644
--- a/Shorewall/Perl/Shorewall/Config.pm
+++ b/Shorewall/Perl/Shorewall/Config.pm
@@ -5408,7 +5408,12 @@ sub get_configuration( $$$$$ ) {
 
     unshift @INC, @config_path;
 
-    default 'PATH' , 
'/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin';
+    my $default_path = 
'/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin';
+
+    default 'PATH' , $default_path;
+
+    $ENV{PATH} .= ":$default_path";
+
     #
     # get_capabilities requires that the true settings of these options be 
established
     #

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to