forked from extern/shorewall_code
Improve some error messages
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3289 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
8f161be409
commit
bb8920962b
@ -2514,7 +2514,7 @@ setup_tunnels() # $1 = name of tunnels file
|
|||||||
addrule ${FW}2${z} -p $protocol $p -j ACCEPT
|
addrule ${FW}2${z} -p $protocol $p -j ACCEPT
|
||||||
addrule ${z}2${FW} -p $protocol $p -j ACCEPT
|
addrule ${z}2${FW} -p $protocol $p -j ACCEPT
|
||||||
else
|
else
|
||||||
error_message "Warning: Invalid gateway zone ($z)" \
|
error_message "WARNING: Invalid gateway zone ($z)" \
|
||||||
" -- Tunnel \"$tunnel\" may encounter problems"
|
" -- Tunnel \"$tunnel\" may encounter problems"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -2566,12 +2566,12 @@ setup_tunnels() # $1 = name of tunnels file
|
|||||||
setup_one_generic $gateway $kind $z1
|
setup_one_generic $gateway $kind $z1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
error_message "Tunnels of type $kind are not supported:" \
|
error_message "WARNING: Tunnels of type $kind are not supported:" \
|
||||||
"Tunnel \"$tunnel\" Ignored"
|
"Tunnel \"$tunnel\" Ignored"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
error_message "Invalid gateway zone ($z)" \
|
error_message "ERROR: Invalid gateway zone ($z)" \
|
||||||
" -- Tunnel \"$tunnel\" Ignored"
|
" -- Tunnel \"$tunnel\" Ignored"
|
||||||
fi
|
fi
|
||||||
done < $TMP_DIR/tunnels
|
done < $TMP_DIR/tunnels
|
||||||
@ -5983,7 +5983,7 @@ process_rule() # $1 = target
|
|||||||
case "$logtarget" in
|
case "$logtarget" in
|
||||||
ACCEPT|DROP|REJECT|CONTINUE)
|
ACCEPT|DROP|REJECT|CONTINUE)
|
||||||
if [ -z "$proto" -a -z "$cli" -a -z "$serv" -a -z "$servport" -a -z "$user" -a -z "$excludesource" -a -z "$excludedest" ] ; then
|
if [ -z "$proto" -a -z "$cli" -a -z "$serv" -a -z "$servport" -a -z "$user" -a -z "$excludesource" -a -z "$excludedest" ] ; then
|
||||||
error_message "Warning -- Rule \"$rule\" is a POLICY"
|
error_message "WARNING -- Rule \"$rule\" is a POLICY"
|
||||||
error_message " -- and should be moved to the policy file"
|
error_message " -- and should be moved to the policy file"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -9270,7 +9270,7 @@ __EOF__
|
|||||||
if [ -z "$EXPORT" ]; then
|
if [ -z "$EXPORT" ]; then
|
||||||
cat >> $RESTOREBASE << __EOF__
|
cat >> $RESTOREBASE << __EOF__
|
||||||
if [ ! -f /usr/share/shorewall/version ] || [ \$(cat /usr/share/shorewall/version) != $VERSION ]; then
|
if [ ! -f /usr/share/shorewall/version ] || [ \$(cat /usr/share/shorewall/version) != $VERSION ]; then
|
||||||
error_message "This script requires Shorewall version $VERSION"
|
error_message "ERROR: This script requires Shorewall version $VERSION"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
__EOF__
|
__EOF__
|
||||||
@ -9281,6 +9281,8 @@ load_kernel_modules
|
|||||||
|
|
||||||
__EOF__
|
__EOF__
|
||||||
|
|
||||||
|
my_mutex_on
|
||||||
|
|
||||||
progress_message2 "Initializing..."
|
progress_message2 "Initializing..."
|
||||||
save_progress_message "Initializing..."
|
save_progress_message "Initializing..."
|
||||||
initialize_netfilter
|
initialize_netfilter
|
||||||
@ -9462,7 +9464,7 @@ add_to_zone() # $1...${n-1} = <interface>[:<hosts>] $n = zone
|
|||||||
[ -n "$IPRANGE_MATCH" ] && [ -f $TMP_DIR/iprange ] && rm -f $TMP_DIR/iprange
|
[ -n "$IPRANGE_MATCH" ] && [ -f $TMP_DIR/iprange ] && rm -f $TMP_DIR/iprange
|
||||||
|
|
||||||
if ! $IPTABLES $@ ; then
|
if ! $IPTABLES $@ ; then
|
||||||
error_message "Can't add $newhost to zone $zone"
|
error_message "ERROR: Can't add $newhost to zone $zone"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9716,7 +9718,7 @@ delete_from_zone() # $1 = <interface>[:<hosts>] $2 = zone
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$found" ] || error_message "Warning: $host does not appear to be in zone $zone"
|
[ -n "$found" ] || error_message "WARNING: $host does not appear to be in zone $zone"
|
||||||
done
|
done
|
||||||
|
|
||||||
for h in $temp; do
|
for h in $temp; do
|
||||||
|
@ -1049,7 +1049,7 @@ report_capabilities() {
|
|||||||
|
|
||||||
# Add IP Aliases
|
# Add IP Aliases
|
||||||
#
|
#
|
||||||
add_ip_aliases() # $1 = List of addresses
|
add_ip_aliases() # $* = List of addresses
|
||||||
{
|
{
|
||||||
local addresses external interface inet cidr rest val arping=$(mywhich arping)
|
local addresses external interface inet cidr rest val arping=$(mywhich arping)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user