8000 contrib/rootless-setuptool: Fix iptables detection · moby/moby@ead379a · GitHub
[go: up one dir, main page]

Skip to content

Commit ead379a

Browse files
committed
contrib/rootless-setuptool: Fix iptables detection
Fix a logical error in the rootless setup tool where the iptables error handling was incorrectly placed. The code was setting `faced_iptables_error=1` even when iptables was available, causing unnecessary error messages and setup suggestions. This patch correctly moves the error handling into the `else` branch so that we only report iptables errors when the command is actually unavailable. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
1 parent 6573a13 commit ead379a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/dockerd-rootless-setuptool.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ init() {
152152
case $iptables_version in
153153
*legacy*) iptables_module="ip_tables" ;;
154154
esac
155+
else
155156
faced_iptables_error=1
156157
if [ -z "$OPT_SKIP_IPTABLES" ]; then
157158
if command -v apt-get > /dev/null 2>&1; then

0 commit comments

Comments
 (0)
0