Clean up error messages

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1664 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2004-10-06 01:52:46 +00:00
parent 8434b752f7
commit a9339fc884

View File

@ -3803,26 +3803,25 @@ add_a_rule()
case "$logtarget" in case "$logtarget" in
ACCEPT|DROP|REJECT|CONTINUE) ACCEPT|DROP|REJECT|CONTINUE)
[ "$logtarget" = REJECT -a -n "$servport" ] && \
fatal_error "Server port may not be specified in a REJECT rule; rule: \"$rule\""
if [ -z "$proto" -a -z "$cli" -a -z "$serv" -a -z "$servport" -a -z "$userspec" ] ; then if [ -z "$proto" -a -z "$cli" -a -z "$serv" -a -z "$servport" -a -z "$userspec" ] ; 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
;; ;;
REDIRECT) REDIRECT)
[ -n "$serv" ] && startup_error "REDIRECT rules cannot"\ [ -n "$serv" ] && \
" specify a server IP; rule: \"$rule\"" fatal_error "REDIRECT rules cannot specify a server IP; rule: \"$rule\""
servport=${servport:=$port} servport=${servport:=$port}
natrule=Yes natrule=Yes
;; ;;
DNAT) DNAT)
[ -n "$serv" ] || fatal_error "DNAT rules require a" \ [ -n "$serv" ] || \
" server address; rule: \"$rule\"" fatal_error "DNAT rules require a server address; rule: \"$rule\""
natrule=Yes natrule=Yes
;; ;;
LOG) LOG)
[ -z "$loglevel" ] && fatal_error "LOG requires log level" [ -z "$loglevel" ] && \
fatal_error "LOG requires log level"
;; ;;
esac esac