TT#14008 allow null TABLE variable

If there's no config file present then retrieval of the table number
yields an empty string. Allow this as an expected case to silence a
warning from bash (using -lt against an empty string)

Change-Id: I0420d2e1c555f6b56a56fc5f47d3bc183a929e50
mr10.2
Richard Fuchs 4 years ago committed by Victor Seva
parent 0c1762eb12
commit 52c91f9ceb

@ -39,7 +39,7 @@ fi
firewall_setup()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
if [ -z "$TABLE" ] || [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi
@ -66,7 +66,7 @@ firewall_setup()
firewall_teardown()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
if [ -z "$TABLE" ] || [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi

@ -39,7 +39,7 @@ fi
firewall_setup()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
if [ -z "$TABLE" ] || [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi
@ -66,7 +66,7 @@ firewall_setup()
firewall_teardown()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
if [ -z "$TABLE" ] || [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi

Loading…
Cancel
Save