Handle the absence of net.inet6.ip6.fw.verbose_limit better

This commit is contained in:
brian 2001-09-14 11:18:06 +00:00
parent 2fe7306d12
commit 328d564479

View File

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