Commit some WT changes to BTS maint.sh
This commit is contained in:
parent
357bafa878
commit
87e8738104
1 changed files with 24 additions and 11 deletions
|
@ -10,22 +10,29 @@ if [ "$PWD" != "/var/SysmoBTS" ]; then
|
||||||
OLDPWD=$PWD
|
OLDPWD=$PWD
|
||||||
cd /var/SysmoBTS
|
cd /var/SysmoBTS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM"
|
SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM"
|
||||||
. /home/rhizomatica/bin/vars.sh
|
. /home/rhizomatica/bin/vars.sh
|
||||||
|
|
||||||
|
# Ensure BTS has access to public internet.
|
||||||
|
/var/SysmoBTS/chk_masq
|
||||||
|
|
||||||
for bts in "${!BTS[@]}" ; do
|
for bts in "${!BTS[@]}" ; do
|
||||||
|
|
||||||
#scp $SSH_OPTS authorized_keys root@${BTS[$bts]}:/home/root/.ssh/
|
#scp $SSH_OPTS authorized_keys root@${BTS[$bts]}:/home/root/.ssh/
|
||||||
|
echo -e "Set Date\n"
|
||||||
|
ssh $SSH_OPTS root@${BTS[$bts]} "date -s '$(date)'"
|
||||||
if [ "$?" != "0" ] ; then
|
if [ "$?" != "0" ] ; then
|
||||||
echo "No ssh access to BTS?"
|
echo "No ssh access to BTS?"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Commands to run on all BTS:
|
# Commands to run on all BTS:
|
||||||
scp $SSH_OPTS ca-fix.sh root@${BTS[$bts]}:/home/root/
|
#scp $SSH_OPTS ca-fix.sh root@${BTS[$bts]}:/home/root/
|
||||||
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /home/root/ca-fix.sh"
|
#ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /home/root/ca-fix.sh"
|
||||||
|
|
||||||
_modelNR=$(ssh $SSH_OPTS ${BTS[$bts]} sysmobts-util model-nr)
|
_modelNR=$(ssh $SSH_OPTS ${BTS[$bts]} sysmobts-util model-nr)
|
||||||
|
continue
|
||||||
|
|
||||||
if [ "$?" == "127" ]; then
|
if [ "$?" == "127" ]; then
|
||||||
echo "No sysmobts-util?"
|
echo "No sysmobts-util?"
|
||||||
|
@ -39,18 +46,23 @@ for bts in "${!BTS[@]}" ; do
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_modelNR" == "65535" ] && [ "$_trxNR" == "255" ] ; then
|
if [ "$_modelNR" == "1020" ] && [ "$_trxNR" == "255" ] ; then
|
||||||
echo "Looks like a SysmoBTS"
|
echo "Looks like a SysmoBTS"
|
||||||
ssh $SSH_OPTS root@${BTS[$bts]} "/home/root/ca-fix.sh"
|
ssh $SSH_OPTS root@${BTS[$bts]} "opkg update ; opkg install osmo-bts osmo-pcu"
|
||||||
# Nothing to do
|
# Nothing to do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$_modelNR" == "65536" ] && [ "$_trxNR" == "255" ] ; then
|
||||||
|
echo "Looks like a SysmoBTS 1002? (65536)"
|
||||||
|
ssh $SSH_OPTS root@${BTS[$bts]} "opkg update ; opkg install osmo-bts osmo-pcu"
|
||||||
|
# Nothing to do
|
||||||
|
fi
|
||||||
|
|
||||||
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"
|
||||||
ssh $SSH_OPTS root@${BTS[$bts]} "/home/root/ca-fix.sh"
|
ssh $SSH_OPTS root@${BTS[$bts]} "opkg update"
|
||||||
|
ssh $SSH_OPTS root@${BTS[$bts]} "opkg install osmo-bts osmo-pcu"
|
||||||
#scp $SSH_OPTS pcu-ns root@${BTS[$bts]}:/bin/
|
#scp $SSH_OPTS pcu-ns 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/pcu-ns /bin/tgl"
|
#ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pcu-ns /bin/tgl"
|
||||||
|
@ -59,14 +71,16 @@ for bts in "${!BTS[@]}" ; do
|
||||||
#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"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_trxNR" == "1" ] ; then
|
if [ "$_trxNR" == "1" ] ; then
|
||||||
# Slave Verified.
|
# Slave Verified.
|
||||||
echo "BTS is a 2050 Slave"
|
echo "BTS is a 2050 Slave"
|
||||||
ssh $SSH_OPTS root@${BTS[$bts]} "/home/root/ca-fix.sh"
|
ssh $SSH_OPTS root@${BTS[$bts]} "opkg update"
|
||||||
|
ssh $SSH_OPTS root@${BTS[$bts]} "opkg install osmo-bts osmo-pcu"
|
||||||
|
#ssh $SSH_OPTS root@${BTS[$bts]} "/home/root/ca-fix.sh"
|
||||||
|
|
||||||
#scp $SSH_OPTS pcu-ns 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
|
||||||
|
@ -76,8 +90,7 @@ for bts in "${!BTS[@]}" ; do
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
/var/SysmoBTS/opkg-1.sh
|
#/var/SysmoBTS/opkg-1.sh
|
||||||
|
|
||||||
|
|
||||||
if [ "$OLDPWD" != "" ]; then
|
if [ "$OLDPWD" != "" ]; then
|
||||||
cd $OLDPWD
|
cd $OLDPWD
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue