SysmoBTS: provision, skip bts on first ssh access error
This commit is contained in:
parent
be742ba98c
commit
4736d25c05
1 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,10 @@ SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM"
|
|||
for bts in "${!BTS[@]}" ; do
|
||||
|
||||
scp $SSH_OPTS authorized_keys root@${BTS[$bts]}:/home/root/.ssh/
|
||||
if [ "$?" != "0" ] ; then
|
||||
echo "No ssh access to BTS?"
|
||||
continue
|
||||
fi
|
||||
scp $SSH_OPTS udhcpc root@${BTS[$bts]}:/etc/default/udhcpc
|
||||
ssh $SSH_OPTS root@${BTS[$bts]} "echo 'root:$BTSPASS' | /usr/sbin/chpasswd"
|
||||
ssh $SSH_OPTS root@${BTS[$bts]} "date -s '$(date)'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue