From 491309a78ab99a4cf5994edb6851336bbc18add0 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 18 Jan 2018 11:34:46 -0800 Subject: [PATCH] Don't use the -quit option to Busybox find Signed-off-by: Tom Eastep --- Shorewall/lib.cli-std | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std index d5d0e9b92..7c606eca7 100644 --- a/Shorewall/lib.cli-std +++ b/Shorewall/lib.cli-std @@ -384,9 +384,24 @@ uptodate() { [ -x $1 ] || return 1 local dir + local busybox + local find + + find=$(mywhich find) + + [ -n "$find" ] || return 1 + + [ -h "${find}" ] && busybox=Yes for dir in $g_shorewalldir $(split $CONFIG_PATH); do - if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then + if [ -n "${busybox}" ]; then + # + # Busybox 'find' doesn't support -quiet. + # + if [ -n "$(${find} ${dir} -maxdepth 1 -type f -newer $1 -print)" ]; then + return 1; + fi + elif [ -n "$(${find} ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then return 1; fi done