diff --git a/distrobox-assemble b/distrobox-assemble index 34364a13..02b234cc 100755 --- a/distrobox-assemble +++ b/distrobox-assemble @@ -43,6 +43,8 @@ pre_init_hooks="" pull="" root="" volume="" +unshare_netns="" +unshare_ipc="" # Cleanup tmpfiles on exit trap 'rm -f ${tmpfile}' EXIT @@ -238,6 +240,12 @@ run_distrobox() ( if [ -n "${entry}" ] && [ "${entry}" -eq 0 ]; then result_command="${result_command} --no-entry" fi + if [ -n "${unshare_netns}" ] && [ "${unshare_netns}" -eq 1 ]; then + result_command="${result_command} --unshare-netns" + fi + if [ -n "${unshare_ipc}" ] && [ "${unshare_ipc}" -eq 1 ]; then + result_command="${result_command} --unshare-ipc" + fi if [ -n "${home}" ]; then result_command="${result_command} --home $(sanitize_variable "${home}")" fi diff --git a/distrobox-create b/distrobox-create index c243b08b..190ad5d7 100755 --- a/distrobox-create +++ b/distrobox-create @@ -496,12 +496,12 @@ generate_command() { --security-opt label=disable --user root:root" - if [ "${unshare_ipc}" -ne 0 ]; then + if [ "${unshare_ipc}" -eq 0 ]; then result_command="${result_command} --ipc host" fi - if [ "${unshare_netns}" -ne 0 ]; then + if [ "${unshare_netns}" -eq 0 ]; then result_command="${result_command} --network host" fi