Add BTS side NS check script

This commit is contained in:
Keith Whyte 2021-06-04 08:32:26 +02:00
parent c630031686
commit 1ffc4a47c7
2 changed files with 19 additions and 9 deletions

View file

@ -48,14 +48,13 @@ for bts in "${!BTS[@]}" ; do
if [ "$_modelNR" == "2050" ] && [ "$_trxNR" == "0" ] ; then if [ "$_modelNR" == "2050" ] && [ "$_trxNR" == "0" ] ; then
# Master Verified. # Master Verified.
echo "BTS is a 2050 Master" echo "BTS is a 2050 Master"
scp $SSH_OPTS mgr root@${BTS[$bts]}:/bin/ scp $SSH_OPTS pcu-ns root@${BTS[$bts]}:/bin/
scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/
scp $SSH_OPTS tgl-s root@${BTS[$bts]}:/bin/tgl scp $SSH_OPTS tgl-s root@${BTS[$bts]}:/bin/tgl
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/mgr /bin/pwr /bin/tgl" ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pcu-ns /bin/tgl"
gunzip -c sysmobts-mgr-arm.gz > sysmobts-mgr #gunzip -c sysmobts-mgr-arm.gz > sysmobts-mgr
ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop sysmobts-mgr" #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop sysmobts-mgr"
scp $SSH_OPTS sysmobts-mgr root@${BTS[$bts]}:/usr/bin/ #scp $SSH_OPTS sysmobts-mgr root@${BTS[$bts]}:/usr/bin/
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 755 /usr/bin/sysmobts-mgr ; systemctl restart sysmobts-mgr" #ssh $SSH_OPTS root@${BTS[$bts]} "chmod 755 /usr/bin/sysmobts-mgr ; systemctl restart sysmobts-mgr"
# things to do # things to do
scp $SSH_OPTS rc.local root@${BTS[$bts]}:/etc/rc.local scp $SSH_OPTS rc.local root@${BTS[$bts]}:/etc/rc.local
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /etc/rc.local" ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /etc/rc.local"
@ -64,9 +63,9 @@ for bts in "${!BTS[@]}" ; do
if [ "$_trxNR" == "1" ] ; then if [ "$_trxNR" == "1" ] ; then
# Slave Verified. # Slave Verified.
echo "BTS is a 2050 Slave" echo "BTS is a 2050 Slave"
scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/ scp $SSH_OPTS pcu-ns root@${BTS[$bts]}:/bin/
scp $SSH_OPTS tgl-m root@${BTS[$bts]}:/bin/tgl scp $SSH_OPTS tgl-m root@${BTS[$bts]}:/bin/tgl
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pwr /bin/tgl" ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pcu-ns /bin/tgl"
# Nothing to do. # Nothing to do.
fi fi

View file

@ -0,0 +1,11 @@
#!/usr/bin/expect -f
spawn telnet localhost 4240
expect ">"
send "enable\r"
expect "#"
send "show ns\r"
expect "#"
send "exit\r"
expect "#"