diff options
Diffstat (limited to 'src/transport/test_transport_simple_send_string.sh')
-rwxr-xr-x | src/transport/test_transport_simple_send_string.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/transport/test_transport_simple_send_string.sh b/src/transport/test_transport_simple_send_string.sh index b2bd05d5f..211abb494 100755 --- a/src/transport/test_transport_simple_send_string.sh +++ b/src/transport/test_transport_simple_send_string.sh | |||
@@ -11,9 +11,11 @@ EOF | |||
11 | if ! [ -d "/run/netns" ]; then | 11 | if ! [ -d "/run/netns" ]; then |
12 | echo You have to create the directory /run/netns. | 12 | echo You have to create the directory /run/netns. |
13 | fi | 13 | fi |
14 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then | 14 | if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then |
15 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config -s '$string'" | 15 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then |
16 | else | ||
17 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" | 16 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" |
18 | exit 78 | 17 | exit 78 |
18 | fi | ||
19 | fi | 19 | fi |
20 | |||
21 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config -s '$string'" | ||