From 9b85df20ff53473e1819a4722f09a949a54cc3ff Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Thu, 18 Aug 2022 08:49:32 +0100 Subject: [PATCH] Stop motd running twice --- roles/home-cli/files/bashrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/home-cli/files/bashrc b/roles/home-cli/files/bashrc index 9105e4e..01000b0 100644 --- a/roles/home-cli/files/bashrc +++ b/roles/home-cli/files/bashrc @@ -61,8 +61,11 @@ done umask 0022 -set -o emacs -set -o noclobber +if [ -z "$ZSH_VERSION" ] +then + set -o emacs + set -o noclobber +fi # Locale and language. ## Clear the existing locale settings and set options I always want. @@ -271,6 +274,11 @@ then fi usermotd () { + if [ -n "$_acp_motd_shown" ] + then + exit 1 + fi + export _acp_motd_shown=1 printf "\033[7m"; uname -sr; printf "\033[0m" if [ -r /etc/os-release ] then