Skip to content

Commit

Permalink
fix(net): use EXTRA_NS directly
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrizhu committed Oct 31, 2023
1 parent ce2e82a commit 19dac90
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions try
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,7 @@ EOF
# --pid: create a new process namespace (needed fr procfs to work right)
# --fork: necessary if we do --pid
# "Creation of a persistent PID namespace will fail if the --fork option is not also specified."
if [ -z "$EXTRA_NS" ]; then
unshare --mount --map-root-user --user --pid --fork "$mount_and_execute"
else
unshare --mount --map-root-user --user --pid --fork --net "$mount_and_execute"
fi
unshare --mount --map-root-user --user --pid --fork $EXTRA_NS "$mount_and_execute"
TRY_EXIT_STATUS=$?

################################################################################
Expand Down Expand Up @@ -533,7 +529,7 @@ do
fi
UNION_HELPER="$OPTARG"
export UNION_HELPER;;
(x) EXTRA_NS="net";;
(x) EXTRA_NS="--net";;
(h|*) usage
exit 0;;
esac
Expand Down

0 comments on commit 19dac90

Please sign in to comment.