Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fromager/external_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def detect_network_isolation() -> None:
cmd = network_isolation_cmd()
if os.name == "posix":
check = [*cmd, "true"]
subprocess.check_call(check, stderr=subprocess.STDOUT)
subprocess.check_output(check, stderr=subprocess.STDOUT)


class NetworkIsolationError(subprocess.CalledProcessError):
Expand Down
9 changes: 8 additions & 1 deletion src/fromager/run_network_isolation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ if [ "$#" -eq 0 ]; then
fi

# bring loopback up
ip link set lo up
if command -v ip 2>&1 >/dev/null; then
ip link set lo up
else
echo "'ip' command is missing, cannot bring up loopback device for $@" >&2
exit 2
fi

# set hostname to "localhost"
if command -v hostname 2>&1 >/dev/null; then
hostname localhost
else
echo "'hostname' command is missing, cannot set host name to 'localhost' for $@" >&2
fi

# replace with command
Expand Down
Loading