On 01/18/2018 11:50 AM, Tom Eastep wrote:
> On 01/18/2018 10:44 AM, kapeka wrote:
>> Hi Tom
>>
>> On Mi, 2018-01-17 at 14:37 -0800, Tom Eastep wrote:
>>> Shorewall 5.1.11 is now available for download.
>>
>> When trying to upgrade shorewall I ran into an error with busybox
>>
>> # shorewall restart
>> find: unrecognized: -quit
>> BusyBox v1.27.2 (2018-01-09 17:45:56 CET) multi-call binary.
>> ....
>>
>> Let me know if you need more info.
>>
> 
> Hi KP,
> 
> Here's a patch -- please let me know if this corrects the problem.
> 

WRONG PATCH!


Correct one attached.

-Tom
-- 
Tom Eastep        \   Q: What do you get when you cross a mobster with
Shoreline,         \     an international standard?
Washington, USA     \ A: Someone who makes you an offer you can't
http://shorewall.org \   understand
                      \_______________________________________________
From bc993c384cefb1d736f883154bfee3be8ef9356e Mon Sep 17 00:00:00 2001
From: Tom Eastep <teas...@shorewall.net>
Date: Thu, 18 Jan 2018 11:34:46 -0800
Subject: Don't use the -quit option to Busybox find

Signed-off-by: Tom Eastep <teas...@shorewall.net>

diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std
index d5d0e9b92..6bc835413 100644
--- a/Shorewall/lib.cli-std
+++ b/Shorewall/lib.cli-std
@@ -384,9 +384,19 @@ uptodate() {
     [ -x $1 ] || return 1
 
     local dir
+    local busybox
+
+    [ -h $(mywhich 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

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Shorewall-users mailing list
Shorewall-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to