add new single use script for the viirb

This commit is contained in:
Nico Schottelius 2020-06-14 22:39:49 +02:00
parent 8256a0b4a2
commit 8921f6ac7d
2 changed files with 32 additions and 0 deletions

View File

@ -368,6 +368,9 @@ stage5()
cat <<EOF | ssh -t "root@${viirb_ip}"
# Remove temporary IP
uci delete network.lanv4temp
# Correct SSID
uci set wireless.default_radio0.ssid='IPv6 everywhere'
uci commit
# Remove our ssh keys

View File

@ -0,0 +1,29 @@
#!/bin/sh
# Nico Schottelius
# 2020-06-14
set -e
set -x
viirb_ip=$1; shift
root_password=$(pwgen -1 32)
cat <<EOF | ssh -t "root@${viirb_ip}"
# Remove temporary IP
uci delete network.lanv4temp
# Correct test SSID to final one
uci set wireless.default_radio0.ssid='IPv6 everywhere'
uci commit
# Remove our ssh keys
rm -f /etc/dropbear/authorized_keys
# Setup root password
printf "${root_password}\n${root_password}\n" | passwd
EOF
echo "Submit to user the root password = ${root_password}"
}