From e0a757ea037af205c5870fdfdf7b820805c293de Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 31 Dec 2017 14:15:45 -0800 Subject: [PATCH] Quit find after finding the first newer file Signed-off-by: Tom Eastep --- Shorewall/lib.cli-std | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std index 737995d5d..21bd19c0d 100644 --- a/Shorewall/lib.cli-std +++ b/Shorewall/lib.cli-std @@ -383,7 +383,7 @@ uptodate() { local ifs if [ -n "$g_shorewalldir" ]; then - if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1)" ]; then + if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then return 1; fi fi @@ -393,7 +393,7 @@ uptodate() { for dir in $CONFIG_PATH; do if [ -n "$dir" ]; then - if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1)" ]; then + if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then IFS="$ifs" return 1; fi