Suppress locale warnings at first run when connecting via SSH (#4976)

* Suppress locale warnings at first run when connecting via SSH
* Move functionality to armbian firstlogin and firstrun scripts
This commit is contained in:
Igor 2023-11-15 21:29:45 +01:00 committed by GitHub
parent 4cf051040e
commit 47612c3426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

5
packages/bsp/common/usr/lib/armbian/armbian-firstlogin Normal file → Executable file
View File

@ -431,6 +431,11 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then
printf "\nYou selected \e[0;91mZSH\x1B[0m as your default shell. If you want to use it right away, please logout and login! \n\n"
fi
# re-enable passing locale environment via ssh
sed -e '/^#AcceptEnv LANG/ s/^#//' -i /etc/ssh/sshd_config
# restart sshd daemon
systemctl reload ssh.service
# rpardini: hacks per-dm, very much legacy stuff that works by a miracle
if [[ "${desktop_dm}" == "lightdm" ]] && [ -n "$RealName" ]; then

View File

@ -52,6 +52,9 @@ case "$1" in
# add unique installation id to the image release file
sed '1s/^/IMAGE_UUID=/' /proc/sys/kernel/random/uuid >> /etc/armbian-image-release
# disable passing locale environment via ssh
sed -e '/AcceptEnv LANG/ s/^#*/#/' -i /etc/ssh/sshd_config
# SSH Keys creation
rm -f /etc/ssh/ssh_host*
read entropy_before </proc/sys/kernel/random/entropy_avail