X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=wrt-setup;h=3c572f29b3ef49f95a92ea277e2a01d746ea26b8;hb=cef9b6ede5c1e028bed1b4dc7895f5dfa121ad6b;hp=3e71ef5099816bcdc45dd6b76785008ce0ea5819;hpb=2ee7b55c3811815cdec75025cefa94918cf99ba7;p=automated-distro-installer diff --git a/wrt-setup b/wrt-setup index 3e71ef5..3c572f2 100755 --- a/wrt-setup +++ b/wrt-setup @@ -23,44 +23,58 @@ x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*} usage() { cat < 1 )); then - usage 1 -fi +case $1 in + -h|--help) usage ;; + -*) : ;; + ?*) h="$1"; shift ;; +esac -if [[ $# == 1 ]]; then - read h <<<"$@" -fi +echo "$0: host=$h" cat ~/.ssh/home.pub | ssh $h dd of=/etc/dropbear/authorized_keys 2>/dev/null -scp /a/bin/fai/wrt-setup-local /a/bin/cedit/cedit $h:/usr/bin -# build for openwrt 18.06.2, r7676-cddd7b4c77 -scp /a/opt/openwrt/source/bin/packages/mips_24kc/mypackages/relay_1.0-1_mips_24kc.ipk $h: -ssh $h </etc/opkg/customfeeds.conf <<'EOF' +src/gz openwrt_packages http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/packages +EOF + if ! opkg list-installed|grep bash; then opkg update opkg install bash fi export HOME_DOMAIN=$HOME_DOMAIN -wrt-setup-local $local_arg -EOF +export WIRELESSMAC=$WIRELESSMAC +wrt-setup-local $@ +EOFOUTER