ZSH - if choosen at first boot - tell user to logout / login

Executing shell from BASH can cause troubles ...
This commit is contained in:
Igor Pecovnik 2020-12-30 20:17:24 +01:00
parent e7406614ac
commit 604fced6ff

View File

@ -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