add new single use script for the viirb
This commit is contained in:
parent
8256a0b4a2
commit
8921f6ac7d
2 changed files with 32 additions and 0 deletions
|
@ -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
|
||||
|
|
29
viirb-cleanup-final-stage.sh
Normal file
29
viirb-cleanup-final-stage.sh
Normal 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}"
|
||||
|
||||
}
|
Loading…
Reference in a new issue