badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Copyright 2020-present Open Networking Foundation |
| 4 | # |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 5 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 6 | |
| 7 | set -xe |
| 8 | |
| 9 | {{- if .Values.config.coreDump.enabled }} |
Ajay Lotan Thakur | 4ebd7e8 | 2022-01-14 09:11:42 -0700 | [diff] [blame] | 10 | cp /gnbsim/bin/gnbsim /tmp/coredump/ |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 11 | {{- end }} |
| 12 | |
Ajay Lotan Thakur | 4ebd7e8 | 2022-01-14 09:11:42 -0700 | [diff] [blame] | 13 | cd /gnbsim |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 14 | cat ./config/gnb.conf |
| 15 | cat /etc/hosts |
Ajay Lotan Thakur | 0203c3b | 2022-03-21 13:40:11 -0600 | [diff] [blame] | 16 | |
Vijaya Tiruveedula | 56f595f | 2022-10-27 05:28:50 -0600 | [diff] [blame] | 17 | {{- define "gnbiplist" -}} |
| 18 | {{- join "," .Values.config.gnbsim.gnb.ips }} |
| 19 | {{- end -}} |
| 20 | |
Ajay Lotan Thakur | 0203c3b | 2022-03-21 13:40:11 -0600 | [diff] [blame] | 21 | {{- if not .Values.config.gnbsim.singleInterface }} |
| 22 | {{- range .Values.config.gnbsim.networkTopo }} |
Hyunsun Moon | 2b21eb4 | 2022-03-24 01:52:22 -0600 | [diff] [blame] | 23 | ip route replace {{ .upfAddr }} via {{ .upfGw }} |
| 24 | {{- end }} |
Ajay Lotan Thakur | 0203c3b | 2022-03-21 13:40:11 -0600 | [diff] [blame] | 25 | {{- end }} |
| 26 | |
Badhrinath Padmanabhan | a0c93b7 | 2022-11-21 21:53:00 -0600 | [diff] [blame] | 27 | {{- if .Values.config.gnbsim.httpServer.enable}} |
| 28 | cd /gnbsim |
| 29 | ./bin/gnbsim --cfg ./config/gnb.conf |
| 30 | {{- else }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 31 | sleep infinity |
Badhrinath Padmanabhan | a0c93b7 | 2022-11-21 21:53:00 -0600 | [diff] [blame] | 32 | {{- end }} |