Don't run 'find' in the PWD

- Also remove -mindepth so as to catch deletions in the directories

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2017-12-31 13:06:49 -08:00
parent 71f8bad300
commit 5053999442
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -372,13 +372,21 @@ uptodate() {
local dir local dir
local ifs local ifs
if [ -n "$g_shorewalldir" ]; then
if [ -n "$(find ${dir} -maxdepth 1 -newer $1)" ]; then
return 1;
fi
fi
ifs="$IFS" ifs="$IFS"
IFS=':' IFS=':'
for dir in $g_shorewalldir $CONFIG_PATH; do for dir in $CONFIG_PATH; do
if [ -n "$(find ${dir} -mindepth 1 -maxdepth 1 -newer $1)" ]; then if [ -n "$dir" ]; then
IFS="$ifs" if [ -n "$(find ${dir} -maxdepth 1 -newer $1)" ]; then
return 1; IFS="$ifs"
return 1;
fi
fi fi
done done