fix viirb-1 to use ipv6 literal addresses

This commit is contained in:
Nico Schottelius 2020-10-08 11:42:40 +02:00
parent 3c07e54b11
commit 35098485bb
1 changed files with 11 additions and 0 deletions

View File

@ -12,6 +12,10 @@ fi
set -x
dev=$1; shift
# $# = 2
# shift -> remove the first argument
# $# = 1
if [ $# -ge 1 ]; then
viirb_ip=$1; shift
dev=""
@ -42,6 +46,13 @@ cat ~/.ssh/id_rsa.pub | ssh root@${viirb_ip} "cat > /etc/dropbear/authorized_key
# Don't re-download if we already have it
wget -c http://downloads.openwrt.org/releases/${version}/targets/ramips/mt76x8/${filename}
if echo $viirb_ip | grep -q :; then
scp_ip="[$viirb_ip]"
else
scp_ip="$viirb_ip"
fi
scp ${filename} root@${viirb_ip}:/tmp
ssh root@${viirb_ip} "sysupgrade /tmp/*.bin"