diff options
author | Sridhar Rao <sridhar.rao@spirent.com> | 2021-11-05 05:57:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2021-11-05 05:57:12 +0000 |
commit | 8c3b7592ac77d025ed92b163e7258298e869df28 (patch) | |
tree | ce3fba916646369799c7a3bb29fa9372cff2be81 /tools/k8s/test-containers/trafficgen-pods/prox/start.sh | |
parent | 19fa6a4b5cd6844be4369e90a31f63700477a200 (diff) | |
parent | 773934de71fafcd332879838bf519ef3d90271e1 (diff) |
Merge "K8S: PROX and TREX containers."
Diffstat (limited to 'tools/k8s/test-containers/trafficgen-pods/prox/start.sh')
-rwxr-xr-x | tools/k8s/test-containers/trafficgen-pods/prox/start.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/k8s/test-containers/trafficgen-pods/prox/start.sh b/tools/k8s/test-containers/trafficgen-pods/prox/start.sh new file mode 100755 index 00000000..7fbeedf8 --- /dev/null +++ b/tools/k8s/test-containers/trafficgen-pods/prox/start.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +## +## Copyright (c) 2010-2019 Intel Corporation +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## + +function save_k8s_envs() +{ + printenv | grep "PCIDEVICE_INTEL_COM" > /opt/rapid/k8s_sriov_device_plugin_envs +} + +function create_tun() +{ + mkdir -p /dev/net + mknod /dev/net/tun c 10 200 + chmod 600 /dev/net/tun +} + +save_k8s_envs +create_tun + +# Ready for testing +touch /opt/rapid/system_ready_for_rapid + +# Start SSH server in background +/usr/sbin/sshd + +exec sleep infinity |