[Firewall] Errors during execution of 2.0.1.f

Jānis je at ktf.rtu.lv
Sun Nov 29 09:48:32 CET 2015


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



More information about the Firewall mailing list