From d1dac5d50c24a5417cdb607e057ed07fb161117a Mon Sep 17 00:00:00 2001 From: Steffen Prohaska Date: Mon, 8 Oct 2007 14:03:20 +0200 Subject: [PATCH] profile: if HOME is missing report error and quit HOME is expected to be there. Either HOME is automatically set to USERPROFILE or it was set present in the environment. There's no need to create the directory. If it is missing there's something fundamentally wrong. Hence, we report an error and quit. Signed-off-by: Steffen Prohaska --- etc/profile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/profile b/etc/profile index 5c6acc59..33660c1b 100644 --- a/etc/profile +++ b/etc/profile @@ -33,7 +33,11 @@ if [ -z "$HOME" ]; then fi if [ ! -d "$HOME" ]; then - mkdir -p "$HOME" + echo "Error: HOME directory '$HOME' doen't exist!" + echo "Please fix this error and restart shell." + echo "Press key to quit." + read dummy + exit 1 fi # normalize HOME to unix path -- 2.11.4.GIT