Handle the absence of net.inet6.ip6.fw.verbose_limit better
This commit is contained in:
parent
2fe7306d12
commit
328d564479
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user