net/templates: support running osmo-bts-virtual

New config variables:
* BTS0_RUN_IN_OSMO_DEV
* BTS0_IP
* BTS1_RUN_IN_OSMO_DEV
* BTS1_IP

Change-Id: Ibc8efe75abffcefc0a719b6323a9ceca39f14ea1
diff --git a/net/templates/osmo-bts.cfg b/net/templates/osmo-bts-0.cfg
similarity index 71%
rename from net/templates/osmo-bts.cfg
rename to net/templates/osmo-bts-0.cfg
index 1d3e6a9..f6fd3ac 100644
--- a/net/templates/osmo-bts.cfg
+++ b/net/templates/osmo-bts-0.cfg
@@ -4,3 +4,9 @@
 bts 0
  ipa unit-id ${BTS0_IPA_UNIT}
  oml remote-ip ${BSC0_IP}
+
+ctrl
+ bind ${BTS0_IP}
+
+line vty
+ bind ${BTS0_IP}
diff --git a/net/templates/osmo-bts-1.cfg b/net/templates/osmo-bts-1.cfg
new file mode 100644
index 0000000..e4e3c64
--- /dev/null
+++ b/net/templates/osmo-bts-1.cfg
@@ -0,0 +1,12 @@
+${include(common_template_warning)}
+${include(common_osmo_bts)}
+
+bts 0
+ ipa unit-id ${BTS1_IPA_UNIT}
+ oml remote-ip ${BSC1_IP}
+
+ctrl
+ bind ${BTS1_IP}
+
+line vty
+ bind ${BTS1_IP}
diff --git a/net/templates/run.sh b/net/templates/run.sh
index 3430966..42b1eb4 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -181,6 +181,7 @@
 stp4ran="osmo-stp -c osmo-stp-ran.cfg"
 bsc="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-bsc"
 bscnat="osmo-bsc-nat"
+bts="osmo-bts-virtual"
 
 if [ "x${MSC_MNCC}" != "xinternal" ]; then
   sipcon="osmo-sip-connector -c osmo-sip-connector.cfg"
@@ -272,6 +273,13 @@
   term "$bsc -c osmo-bsc-1.cfg" BSC1
 fi
 
+${foreach(BTS)}
+if [ "${BTSn_RUN_IN_OSMO_DEV}" = 1 ]; then
+  term "$bts -c osmo-bts-${BTSn}.cfg" BTS${BTSn}
+fi
+${foreach_end}
+
+
 if [ "x${MSC_MNCC}" != "xinternal" ]; then
   sleep .2
   term "$sipcon" SIPCON