fix viirb-1 to use ipv6 literal addresses
This commit is contained in:
parent
3c07e54b11
commit
35098485bb
1 changed files with 11 additions and 0 deletions
|
@ -12,6 +12,10 @@ fi
|
||||||
set -x
|
set -x
|
||||||
dev=$1; shift
|
dev=$1; shift
|
||||||
|
|
||||||
|
# $# = 2
|
||||||
|
# shift -> remove the first argument
|
||||||
|
# $# = 1
|
||||||
|
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
viirb_ip=$1; shift
|
viirb_ip=$1; shift
|
||||||
dev=""
|
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
|
# Don't re-download if we already have it
|
||||||
wget -c http://downloads.openwrt.org/releases/${version}/targets/ramips/mt76x8/${filename}
|
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
|
scp ${filename} root@${viirb_ip}:/tmp
|
||||||
ssh root@${viirb_ip} "sysupgrade /tmp/*.bin"
|
ssh root@${viirb_ip} "sysupgrade /tmp/*.bin"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue