From 19dac90c6abdbe3e5b9ab0ee0fb77d24714176fe Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Tue, 31 Oct 2023 00:58:38 -0400 Subject: [PATCH] fix(net): use EXTRA_NS directly --- try | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/try b/try index 79b61fdf..9a283833 100755 --- a/try +++ b/try @@ -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=$? ################################################################################ @@ -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