mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-20 08:26:49 +02:00
58 lines
1.9 KiB
Diff
58 lines
1.9 KiB
Diff
From 747275264d10401d15905f1f7d1a9e2e5a00904d Mon Sep 17 00:00:00 2001
|
|
From: Alex <alex-gitlab.x6izqcc7@alxu.ca>
|
|
Date: Sat, 31 Jul 2021 23:18:14 +0000
|
|
Subject: [PATCH] lib.cli-std: stop checking for busybox
|
|
|
|
it doesn't actually check if find supports -quit (i.e. will break in hardlink or reflink mode), the code path is broken ($AUTOMAKE is not quoted), and busybox has supported -quit for three years now
|
|
---
|
|
Shorewall/lib.cli-std | 27 ++++-----------------------
|
|
1 file changed, 4 insertions(+), 23 deletions(-)
|
|
|
|
diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std
|
|
index a5a497674..62fffdc08 100644
|
|
--- a/lib.cli-std
|
|
+++ b/lib.cli-std
|
|
@@ -381,36 +381,17 @@ uptodate() {
|
|
[ -x $1 ] || return 1
|
|
|
|
local dir
|
|
- local busybox
|
|
- local find
|
|
-
|
|
- find=$(mywhich find)
|
|
-
|
|
- [ -n "${find}" ] || return 1
|
|
- [ -h "${find}" ] && busybox=Yes
|
|
- find="${find} -L"
|
|
|
|
for dir in $g_shorewalldir $(split $CONFIG_PATH); do
|
|
- if [ -n "${busybox}" ]; then
|
|
- #
|
|
- # Busybox 'find' doesn't support -quit.
|
|
- #
|
|
- if [ $AUTOMAKE = recursive ]; then
|
|
- if [ -n "$(${find} ${dir} -newer $1 -print)" ]; then
|
|
- return 1;
|
|
- fi
|
|
- elif [ -n "$(${find} ${dir} -maxdepth $AUTOMAKE -type f -newer $1 -print)" ]; then
|
|
- return 1;
|
|
- fi
|
|
- elif [ "$AUTOMAKE" = recursive ]; then
|
|
- if [ -n "$(${find} ${dir} -newer $1 -print -quit)" ]; then
|
|
+ if [ "$AUTOMAKE" = recursive ]; then
|
|
+ if [ -n "$(find ${dir} -newer $1 -print -quit)" ]; then
|
|
return 1;
|
|
fi
|
|
elif [ -z "$AUTOMAKE" ]; then
|
|
- if [ -n "$(${find} ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then
|
|
+ if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then
|
|
return 1;
|
|
fi
|
|
- elif [ -n "$(${find} ${dir} -maxdepth $AUTOMAKE -type f -newer $1 -print -quit)" ]; then
|
|
+ elif [ -n "$(find ${dir} -maxdepth $AUTOMAKE -type f -newer $1 -print -quit)" ]; then
|
|
return 1;
|
|
fi
|
|
done
|
|
--
|
|
GitLab
|
|
|