Skip to content

Commit 2da3064

Browse files
committed
fix(net): check if var is empty instead of matching strings
1 parent 7d6599e commit 2da3064

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

try

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ EOF
233233
# --pid: create a new process namespace (needed fr procfs to work right)
234234
# --fork: necessary if we do --pid
235235
# "Creation of a persistent PID namespace will fail if the --fork option is not also specified."
236-
if [ "$EXTRA_NS" = "net" ]; then
237-
unshare --mount --map-root-user --user --pid --fork --net "$mount_and_execute"
238-
else
236+
if [ -z "$EXTRA_NS" ]; then
239237
unshare --mount --map-root-user --user --pid --fork "$mount_and_execute"
238+
else
239+
unshare --mount --map-root-user --user --pid --fork --net "$mount_and_execute"
240240
fi
241241
TRY_EXIT_STATUS=$?
242242

0 commit comments

Comments
 (0)