dot/bash_profile: Don't change directory if running under schroot.
[profile] / dot / bash_profile
index ac47371..b6c09bf 100644 (file)
@@ -56,7 +56,7 @@ __mdw_programp () { type -t >/dev/null "$1"; }
 ## changes directory and displays the name of the directory in a subshell to
 ## avoid changing the current state.
 HOME=`(set -P; cd $HOME; pwd)`
-cd $HOME
+[ -n "$SCHROOT_SESSION_ID" ] || cd $HOME
 
 ## CDE's session structure is demented and doesn't leave us with a proper
 ## logout hook, so synthesize one here.