[vigir/viirb] firmware upgrade needs ip address
This commit is contained in:
parent
8fbb6c8edd
commit
119f8533ad
2 changed files with 4 additions and 41 deletions
|
@ -2,38 +2,19 @@
|
||||||
# 2020-06-13, Nico Schottelius
|
# 2020-06-13, Nico Schottelius
|
||||||
# See https://ungleich.ch/u/products/viirb-ipv6-box/
|
# See https://ungleich.ch/u/products/viirb-ipv6-box/
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
echo "$0 interface [address]"
|
echo "$0 interface [address]"
|
||||||
echo " interface to add the config ip address to"
|
|
||||||
echo " address: connect to this address, ignore the interface"
|
echo " address: connect to this address, ignore the interface"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
dev=$1; shift
|
vigir_ip=$1; shift
|
||||||
|
|
||||||
# $# = 2
|
|
||||||
# shift -> remove the first argument
|
|
||||||
# $# = 1
|
|
||||||
|
|
||||||
if [ $# -ge 1 ]; then
|
|
||||||
vigir_ip=$1; shift
|
|
||||||
dev=""
|
|
||||||
else
|
|
||||||
vigir_ip=192.168.8.1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# openwrt
|
# openwrt
|
||||||
version=19.07.5
|
version=19.07.5
|
||||||
filename=openwrt-${version}-ramips-mt7621-zbt-wg3526-16M-squashfs-sysupgrade.bin
|
filename=openwrt-${version}-ramips-mt7621-zbt-wg3526-16M-squashfs-sysupgrade.bin
|
||||||
|
|
||||||
# IP address for setting it up initially
|
|
||||||
|
|
||||||
if [ "$dev" ]; then
|
|
||||||
sudo ip addr del 192.168.8.2/24 dev "$dev" 2>/dev/null || true
|
|
||||||
sudo ip addr add 192.168.8.2/24 dev "$dev"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# don't care about other/old known_host entries
|
# don't care about other/old known_host entries
|
||||||
ssh-keygen -R ${vigir_ip}
|
ssh-keygen -R ${vigir_ip}
|
||||||
|
|
||||||
|
|
|
@ -2,38 +2,20 @@
|
||||||
# 2020-06-13, Nico Schottelius
|
# 2020-06-13, Nico Schottelius
|
||||||
# See https://ungleich.ch/u/products/viirb-ipv6-box/
|
# See https://ungleich.ch/u/products/viirb-ipv6-box/
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
echo "$0 interface [address]"
|
echo "$0 interface [address]"
|
||||||
echo " interface to add the config ip address to"
|
|
||||||
echo " address: connect to this address, ignore the interface"
|
echo " address: connect to this address, ignore the interface"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
dev=$1; shift
|
|
||||||
|
|
||||||
# $# = 2
|
viirb_ip=$1; shift
|
||||||
# shift -> remove the first argument
|
|
||||||
# $# = 1
|
|
||||||
|
|
||||||
if [ $# -ge 1 ]; then
|
|
||||||
viirb_ip=$1; shift
|
|
||||||
dev=""
|
|
||||||
else
|
|
||||||
viirb_ip=192.168.61.1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# openwrt
|
# openwrt
|
||||||
version=19.07.5
|
version=19.07.5
|
||||||
filename=openwrt-${version}-ramips-mt76x8-vocore2-squashfs-sysupgrade.bin
|
filename=openwrt-${version}-ramips-mt76x8-vocore2-squashfs-sysupgrade.bin
|
||||||
|
|
||||||
# IP address for setting it up initially
|
|
||||||
|
|
||||||
if [ "$dev" ]; then
|
|
||||||
sudo ip addr del 192.168.61.2/24 dev "$dev" 2>/dev/null || true
|
|
||||||
sudo ip addr add 192.168.61.2/24 dev "$dev"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# don't care about other/old known_host entries
|
# don't care about other/old known_host entries
|
||||||
ssh-keygen -R ${viirb_ip}
|
ssh-keygen -R ${viirb_ip}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue