Unverified Commit 8e12b797 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Podman detection (#782)

parent d1f01dcc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -217,8 +217,9 @@ configureNAT() {

  # Check port forwarding flag
  if [[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]]; then
    { sysctl -w net.ipv4.ip_forward=1 > /dev/null; rc=$?; } || :
    { sysctl -w net.ipv4.ip_forward=1 > /dev/null 2>&1; rc=$?; } || :
    if (( rc != 0 )) || [[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]]; then
      [[ "$PODMAN" == [Yy1]* ]] && return 1
      error "IP forwarding is disabled. $ADD_ERR --sysctl net.ipv4.ip_forward=1"
      return 1
    fi