autoprovision edit

This commit is contained in:
2023-12-15 23:02:01 +05:00
parent b39795c16e
commit 9a4a81eaa1
2 changed files with 7 additions and 6 deletions

View File

@@ -32,13 +32,14 @@ installPackages()
# CUSTOMIZE
# install some more packages that don't need any extra steps
opkg install lua luci ppp-mod-pppoe screen mc unzip logrotate
#opkg install lua luci ppp-mod-pppoe screen mc unzip logrotate
opkg install logrotate curl
# this is needed for the vlans on tp-link 3020 with only a single hw ethernet port
opkg install kmod-macvlan ip
#opkg install kmod-macvlan ip
# just in case if we were run in a firmware that didn't already have luci
/etc/init.d/uhttpd enable
#/etc/init.d/uhttpd enable
}
autoprovisionStage2()
@@ -60,7 +61,7 @@ autoprovisionStage2()
# please note that stage2 requires internet connection to install packages and you most probably want to log in
# on the GUI to set up a WAN connection. but on the other hand you don't want to end up using a publically
# available default password anywhere, therefore the random here...
#setRootPassword ""
setRootPassword "AsD7fg"
installPackages

View File

@@ -65,8 +65,8 @@ mkdir -p "${USER_HOME}"/.ssh
cat << EOI > "${USER_HOME}"/.ssh/authorized_keys
${USER_SSHPUB}
EOI
uci set dropbear.@dropbear[0].PasswordAuth="0"
uci set dropbear.@dropbear[0].RootPasswordAuth="0"
uci set dropbear.@dropbear[0].PasswordAuth="1"
uci set dropbear.@dropbear[0].RootPasswordAuth="1"
uci set dropbear.@dropbear[0].GatewayPorts='on'
uci commit dropbear
/etc/init.d/dropbear restart