[Firewall] Errors during execution of 2.0.1.f

Lonnie Abelbeck lists at lonnie.abelbeck.com
Sun Nov 29 15:55:13 CET 2015


Hi Jānis,

Thanks for the report.

I think the proper fix is to simply remove cut's " -s " option on line 141, ie.

-  ver=$(uname -r |cut -s -d'-' -f1)
+  ver=$(uname -r |cut -d'-' -f1)

We need to trim any possible '-.*' characters so the ver_rev only contains a number.

If you don't mind, fix your version as above and if that works we will commit the fix.

Thanks,

Lonnie


On Nov 29, 2015, at 2:48 AM, Jānis <je at ktf.rtu.lv> wrote:

> Hi!
> 
> when I execute the script, i get such error msgs:
> 
> Arno's Iptables Firewall Script v2.0.1f
> -------------------------------------------------------------------------------
> /usr/local/share/arno-iptables-firewall/environment: line 144: [: -gt: unary operator expected
> /usr/local/share/arno-iptables-firewall/environment: line 146: [: -lt: unary operator expected
> /usr/local/share/arno-iptables-firewall/environment: line 151: [: -gt: unary operator expected
> /usr/local/share/arno-iptables-firewall/environment: line 153: [: -lt: unary operator expected
> /usr/local/share/arno-iptables-firewall/environment: line 158: [: -gt: unary operator expected
> /usr/local/share/arno-iptables-firewall/environment: line 160: [: -lt: unary operator expected
> 
> turning on verbose output I see that script executes well after them.
> 
> the problem lies on the line 141: ver=$(uname -r |cut -s -d'-' -f1)
> 
> it returns empty string.
> 
> In my case uname -r returns plain 4.1.12 and changing the line 141 to ver=$(uname -r) solves the problem.
> 
> Slack64-14.1/kernel 4.12/bash 4.2.53/iptables v1.4.21
> 
> Janis
> 
> _______________________________________________
> Firewall mailing list
> Firewall at rocky.eld.leidenuniv.nl
> http://rocky.eld.leidenuniv.nl/mailman/listinfo/firewall
> Arno's (Linux IPTABLES Firewall) Homepage:
> http://rocky.eld.leidenuniv.nl



More information about the Firewall mailing list