From 41b6f55131444bc7d9834331f4fe7b3c4151ad36 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Jan 2021 14:05:16 +0100 Subject: [PATCH] [viwib] remove dev argument for viwib-1 script --- openwrt/viwib-1-firmware-upgrade.sh | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/openwrt/viwib-1-firmware-upgrade.sh b/openwrt/viwib-1-firmware-upgrade.sh index 7a910f1..88c8748 100755 --- a/openwrt/viwib-1-firmware-upgrade.sh +++ b/openwrt/viwib-1-firmware-upgrade.sh @@ -2,38 +2,20 @@ # 2020-06-13, Nico Schottelius # See https://ungleich.ch/u/products/viirb-ipv6-box/ -if [ $# -lt 1 ]; then - echo "$0 interface [address]" - echo " interface to add the config ip address to" +if [ $# -ne 1 ]; then + echo "$0 address" echo " address: connect to this address, ignore the interface" exit 1 fi set -x -dev=$1; shift -# $# = 2 -# shift -> remove the first argument -# $# = 1 - -if [ $# -ge 1 ]; then - viwib_ip=$1; shift - dev="" -else - viwib_ip=192.168.8.1 -fi +viwib_ip=$1; shift # openwrt version=19.07.5 filename=openwrt-${version}-ramips-mt76x8-gl-mt300n-v2-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 ssh-keygen -R ${viwib_ip}