From d7187daadfb1e6533dea4a3dfd02a9e700a52152 Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Sat, 29 May 2021 09:20:43 +0200 Subject: [PATCH] LiteCel: Add scripts to reset boards, (toggle power) --- modules/rhizo_base/files/var/SysmoBTS/maint.sh | 6 ++++-- modules/rhizo_base/files/var/SysmoBTS/tgl-m | 7 +++++++ modules/rhizo_base/files/var/SysmoBTS/tgl-s | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 modules/rhizo_base/files/var/SysmoBTS/tgl-m create mode 100644 modules/rhizo_base/files/var/SysmoBTS/tgl-s diff --git a/modules/rhizo_base/files/var/SysmoBTS/maint.sh b/modules/rhizo_base/files/var/SysmoBTS/maint.sh index 89b74a1..15c20ec 100644 --- a/modules/rhizo_base/files/var/SysmoBTS/maint.sh +++ b/modules/rhizo_base/files/var/SysmoBTS/maint.sh @@ -50,7 +50,8 @@ for bts in "${!BTS[@]}" ; do echo "BTS is a 2050 Master" scp $SSH_OPTS mgr root@${BTS[$bts]}:/bin/ scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/ - ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/mgr /bin/pwr" + scp $SSH_OPTS tgl-s root@${BTS[$bts]}:/bin/tgl + ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/mgr /bin/pwr /bin/tgl" gunzip -c sysmobts-mgr-arm.gz > sysmobts-mgr ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop sysmobts-mgr" scp $SSH_OPTS sysmobts-mgr root@${BTS[$bts]}:/usr/bin/ @@ -64,7 +65,8 @@ for bts in "${!BTS[@]}" ; do # Slave Verified. echo "BTS is a 2050 Slave" scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/ - ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pwr" + scp $SSH_OPTS tgl-m root@${BTS[$bts]}:/bin/tgl + ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pwr /bin/tgl" # Nothing to do. fi diff --git a/modules/rhizo_base/files/var/SysmoBTS/tgl-m b/modules/rhizo_base/files/var/SysmoBTS/tgl-m new file mode 100644 index 0000000..1c58f31 --- /dev/null +++ b/modules/rhizo_base/files/var/SysmoBTS/tgl-m @@ -0,0 +1,7 @@ +#!/bin/sh + +# Toggle the power on the Master (reset) +sbts2050-util sbts2050-pwr-enable 0 1 1 +sleep 1 +sbts2050-util sbts2050-pwr-enable 1 1 1 + diff --git a/modules/rhizo_base/files/var/SysmoBTS/tgl-s b/modules/rhizo_base/files/var/SysmoBTS/tgl-s new file mode 100644 index 0000000..140451d --- /dev/null +++ b/modules/rhizo_base/files/var/SysmoBTS/tgl-s @@ -0,0 +1,7 @@ +#!/bin/sh + +# Toggle the power on the Slave (reset) +sbts2050-util sbts2050-pwr-enable 1 0 1 +sleep 1 +sbts2050-util sbts2050-pwr-enable 1 1 1 +