Fix iptables check when sbin isn't in user PATH

Signed-off-by: Mikhail Vorobyov <mikhail.vorobev@uni.lu>
This commit is contained in:
Mikhail Vorobyov 2024-02-02 18:21:28 +03:00 committed by Brad Davidson
parent fa11850563
commit 701e7e45ce
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -1 +1 @@
91e1015131eb5dad5967e7f1ef735222863edf9c2bf8a2eee1c96687c756e52e install.sh
5902e8be9a2a6ca1bcab85de59a6917c766b08feef4ff32648d38c8efe6537c0 install.sh