puppet/modules/rhizo_base/templates/vars.sh.erb
Keith Whyte e5971a2375 Add LAC swapping for osmo-msc
Make LAC config availble to the shell.
Run a script on MSC restart to change the lac and write a state flag to disk.

Due to the fact that osmo-msc may restart due to crash or power outage
hence loosing all VLR state, force all UE to send a LUR by changing the LAC
on all BTS via CTRL commands to osmo-bsc.
2021-06-09 01:29:04 +02:00

45 lines
950 B
Text

#!/bin/sh
RHIZO_SCRIPT="/home/rhizomatica/bin"
function logc() {
txt=$1
echo "[`date '+%d-%m-%Y %H:%M:%S'`] $txt" >> $LOGFILE
}
SITE="<%= @site_name %>"
<% @dids.each_with_index do |did, index| -%>
DID[<%= index %>]=<%= did %>
<% end -%>
#BTSs IP addresses (for amps etc)
declare -a BTS
declare -a LAC
declare -a BTS_MASTER
<% @bts.each_with_index do |bts, index| -%>
BTS[<%= index %>]=<%= bts["ip"] %>
LAC[<%= index %>]=<%= bts["lac"] %>
<% if bts ["model"] == '2050M' -%>
BTS_MASTER[<%= index %>]=<%= bts["ip"] %>
<% end -%>
<% end -%>
BTSPASS=<%= @bts_pass %>
OPKG_CREDS=<%= @opkg_creds %>
LATENCY_HOST=<%= @latency_check_address %>
LATENCY_TINC=<%= @latency_check_vpn %>
STAT_DISK=<%= @stats_disk %>
STAT_IF=<%= @stats_if %>
_PUB_IF=<%= @stats_if %>
RECIPIENTS="<%= @mail_admins -%>"
function bname {
case $1 in
<% @bts.each_with_index do |bts, index| -%>
<%= index %>) echo -n "<%= bts["name"] %>" ;;
<% end -%>
esac
}