tags 489640 + patch thanks Patch attached.
Regards,
--
Chris Lamb, UK [EMAIL PROTECTED]
GPG: 0x634F9A20
diff -urNd picalib-0.1.5.orig/FireWall/firewall picalib-0.1.5/FireWall/firewall
--- picalib-0.1.5.orig/FireWall/firewall 2008-08-24 13:39:02.000000000
+0100
+++ picalib-0.1.5/FireWall/firewall 2008-08-24 13:41:41.000000000 +0100
@@ -24,7 +24,7 @@
# FUNCTION: validate()
# DESCRIPCION: Validate a port string from the config file
-function validate {
+validate () {
token=$1
type=$2
sip="";sport="";dip="";dport="";proto=""
@@ -56,7 +56,7 @@
fi
if [ "x$sip" != "x" ]; then
# In NAT rules, $sip is the original destination ip
- if [ "x$type" == "xNAT" -o "x$type" == "xNPROTO" ]; then
+ if [ "x$type" = "xNAT" -o "x$type" = "xNPROTO" ]; then
sip="-d $sip"
else
sip="-s $sip"
@@ -64,10 +64,10 @@
fi
if [ "x$sport" != "x" ]; then
# In NAT rules, $sport is the original destination port
- if [ "x$type" == "xNAT" ]; then
+ if [ "x$type" = "xNAT" ]; then
sport="--dport $sport"
# In proto rules, sport doesn't make sense...
- elif [ "x$type" == "xPROTO" -a "x$type" == "xNPROTO" ]; then
+ elif [ "x$type" = "xPROTO" -a "x$type" = "xNPROTO" ]; then
echo "ERROR: Source port in protocol rule ($token)"
sport=""
else
@@ -79,7 +79,7 @@
dip="-d $dip"
fi
else
- if [ "x$type" == "xNAT" -o "x$type" == "xNPROTO" ]; then
+ if [ "x$type" = "xNAT" -o "x$type" = "xNPROTO" ]; then
echo "ERROR: dest IP is MANDATORY in NAT rules ($token)"
return 1
fi
@@ -89,10 +89,10 @@
dport="--dport $dport"
fi
else
- if [ "x$type" == "xNAT" ]; then
+ if [ "x$type" = "xNAT" ]; then
echo "ERROR: dest port is MANDATORY in NAT rules ($token)"
return 1
- elif [ "x$type" == "xPROTO" -o "x$type" == "xNPROTO" ]; then
+ elif [ "x$type" = "xPROTO" -o "x$type" = "xNPROTO" ]; then
echo "ERROR: proto is MANDATORY in PROTOCOL rules ($token)"
fi
signature.asc
Description: PGP signature

