Handle the absence of net.inet.ip.fw.verbose_limit better, just like

brian's fix for v6 in rev 1.56.
This commit is contained in:
Bill Fenner 2001-09-18 00:03:48 +00:00
parent d2718e479a
commit febceb3e27
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83596

View File

@ -151,7 +151,7 @@ fi
# Show ipfw rules which have reached the log limit
#
IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null`
if [ $? -eq 0 -a "${IPFW_LOG_LIMIT}" -ne 0 ]; then
if [ $? -eq 0 ] && [ "${IPFW_LOG_LIMIT}" -ne 0 ]; then
ipfw -a l | grep " log " | perl -n -e \
'/^\d+\s+(\d+)/; print if ($1 >= '$IPFW_LOG_LIMIT')' > ${TMP}
if [ -s "${TMP}" ]; then