#!/bin/bash # Copyright (C) 2016 Ian Kelling # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*} usage() { cat </dev/null scp /a/work/libremanage/libremanage /a/bin/fai/wrt-setup-local /a/bin/cedit/cedit $h:/usr/bin # relay is built for openwrt 18.06.2, r7676-cddd7b4c77 sudo scp /q/root/shadow/router /p/c/machine_specific/wrt/etc/dropbear/dropbear_rsa_host_key \ /a/opt/openwrt/source/bin/packages/mips_24kc/mypackages/relay_1.0-1_mips_24kc.ipk \ /p/router-secrets /p/c/machine_specific/wrt/etc/wg.{key,psk} $h: scp ../openwrtkeyring/usign/* $h:/etc/opkg/keys ssh $h </etc/opkg/customfeeds.conf <<'EOF' src/gz openwrt_packages http://downloads.openwrt.org/releases/19.07.3/packages/mips_24kc/packages fi EOF if ! opkg list-installed|grep bash; then opkg update opkg install bash fi export HOME_DOMAIN=$HOME_DOMAIN wrt-setup-local $@ EOFOUTER