From 604fced6ff857d841c0f9e711b5d19fc20ef5141 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Wed, 30 Dec 2020 20:17:24 +0100 Subject: [PATCH] ZSH - if choosen at first boot - tell user to logout / login Executing shell from BASH can cause troubles ... --- packages/bsp/common/usr/lib/armbian/armbian-firstlogin | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin index 3a15d5922f..a111b6c20e 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin +++ b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin @@ -287,6 +287,10 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then done trap - INT TERM EXIT + if [[ ${USER_SHELL} == zsh ]]; 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 + # check whether desktop environment has to be considered if [ -n "$desktop_lightdm" ] && [ -n "$RealName" ] ; then @@ -325,6 +329,4 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then fi fi - # Change root user to ZSH in case selected - [[ ${USER_SHELL} == zsh ]] && exec zsh fi