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.
This commit is contained in:
parent
c5809a00ca
commit
e5971a2375
3 changed files with 24 additions and 0 deletions
21
modules/rhizo_base/files/bin/swap_lac.sh
Executable file
21
modules/rhizo_base/files/bin/swap_lac.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /home/rhizomatica/bin/vars.sh
|
||||
|
||||
_ALT_LAC=""
|
||||
if [ -f /etc/osmocom/alt_lac ]; then
|
||||
_ALT_LAC=$(cat /etc/osmocom/alt_lac)
|
||||
fi
|
||||
|
||||
if [ "$_ALT_LAC" == "" ]; then
|
||||
_ALT_LAC=1
|
||||
else
|
||||
_ALT_LAC=""
|
||||
fi
|
||||
echo $_ALT_LAC > /etc/osmocom/alt_lac
|
||||
/bin/sync
|
||||
for bts in "${!BTS[@]}" ; do
|
||||
echo "BTS $bts:"
|
||||
/usr/bin/osmo_ctrl.py -d 127.0.0.1 -p 4249 -s bts.$bts.location-area-code $_ALT_LAC${LAC[$bts]}
|
||||
/usr/bin/osmo_ctrl.py -d 0 -p 4249 -s bts.$bts.send-new-system-informations 1
|
||||
done
|
|
@ -1,3 +1,4 @@
|
|||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/usr/bin/osmo-msc -c /etc/osmocom/osmo-msc.cfg -l /var/lib/osmocom/sms.db
|
||||
ExecStartPost=/home/rhizomatica/bin/swap_lac.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue