From ac47c95eea1e8ec1dfbf044fd5e2c967f8dea31f Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 14 Dec 2001 08:58:21 +0000 Subject: [PATCH] Work around the bugfeature of test(1). PR: bin/32822 --- etc/periodic/security/550.ipfwlimit | 2 +- etc/periodic/security/650.ip6fwlimit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/periodic/security/550.ipfwlimit b/etc/periodic/security/550.ipfwlimit index 3bc13b8376db..cb6caafa5757 100755 --- a/etc/periodic/security/550.ipfwlimit +++ b/etc/periodic/security/550.ipfwlimit @@ -44,7 +44,7 @@ rc=0 case "$daily_status_security_ipfwlimit_enable" in [Yy][Ee][Ss]) 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 diff --git a/etc/periodic/security/650.ip6fwlimit b/etc/periodic/security/650.ip6fwlimit index 96af389e7c71..a713908d259e 100755 --- a/etc/periodic/security/650.ip6fwlimit +++ b/etc/periodic/security/650.ip6fwlimit @@ -44,7 +44,7 @@ rc=0 case "$daily_status_security_ip6fwlimit_enable" in [Yy][Ee][Ss]) 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