diff options
author | ru <ru@FreeBSD.org> | 2001-12-14 08:58:21 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-12-14 08:58:21 +0000 |
commit | 1255b8caf5cf33b97c5236092b606c1cce191793 (patch) | |
tree | b413845973a4aaea8e14fa287d6dbba7efacfc4e /etc/periodic | |
parent | 8e6d2fbcbd6632194a3b13da9a3450e36b23cfbb (diff) | |
download | FreeBSD-src-1255b8caf5cf33b97c5236092b606c1cce191793.zip FreeBSD-src-1255b8caf5cf33b97c5236092b606c1cce191793.tar.gz |
Work around the bugfeature of test(1).
PR: bin/32822
Diffstat (limited to 'etc/periodic')
-rwxr-xr-x | etc/periodic/security/550.ipfwlimit | 2 | ||||
-rwxr-xr-x | 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 3bc13b8..cb6caaf 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 96af389..a713908 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 |