From 701e7e45cef4a7bbc158fd8208f597c9a7562759 Mon Sep 17 00:00:00 2001 From: Mikhail Vorobyov Date: Fri, 2 Feb 2024 18:21:28 +0300 Subject: [PATCH] Fix iptables check when sbin isn't in user PATH Signed-off-by: Mikhail Vorobyov --- install.sh | 2 +- install.sh.sha256sum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 34bfe1ef6f..ddb4c95656 100755 --- a/install.sh +++ b/install.sh @@ -1057,7 +1057,7 @@ openrc_start() { } has_working_xtables() { - if command -v "$1-save" 1> /dev/null && command -v "$1-restore" 1> /dev/null; then + if $SUDO sh -c "command -v \"$1-save\"" 1> /dev/null && $SUDO sh -c "command -v \"$1-restore\"" 1> /dev/null; then if $SUDO $1-save 2>/dev/null | grep -q '^-A CNI-HOSTPORT-MASQ -j MASQUERADE$'; then warn "Host $1-save/$1-restore tools are incompatible with existing rules" else diff --git a/install.sh.sha256sum b/install.sh.sha256sum index 8f5ea770b2..231332ecb6 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -91e1015131eb5dad5967e7f1ef735222863edf9c2bf8a2eee1c96687c756e52e install.sh +5902e8be9a2a6ca1bcab85de59a6917c766b08feef4ff32648d38c8efe6537c0 install.sh