minor fixes and dns
[automated-distro-installer] / wrt-setup
index c86a0d5e1b8d4da92af5b783f17e6602378ef109..7d3416bcd1d308d32d2b03e4ba307f4b553c853d 100755 (executable)
--- a/wrt-setup
+++ b/wrt-setup
@@ -69,27 +69,11 @@ fi
 echo "$0: host=$h"
 
 cat ~/.ssh/home.pub | ssh $h dd of=/etc/dropbear/authorized_keys 2>/dev/null
-scp /a/work/libremanage/libremanage /a/bin/fai/wrt-setup-local /a/bin/cedit/cedit $h:/usr/bin
+scp /a/work/libremanage/libremanage /a/bin/fai/wrt-init /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 <<EOFOUTER
-set -x
-# librecmc 1.5.1 is missing nfs-kernel-server and screen
-source /etc/os-release
-if [[ $ID == librecmc && $VERSION == v1.5.1-core]]; then
- cat >/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
+ssh $h wrt-init $HOME_DOMAIN "$@"