diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-11-02 22:24:24 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-11-02 22:24:24 +0100 |
commit | b4c22f25468cbb0b1644194381b25c795502bc16 (patch) | |
tree | 1f33dfd08b808a8e5c9518c78012b8b80e8d9016 /gnu/system/shadow.scm | |
parent | 5146f22b3b1615ed9d10796a0b1fffdf617138ef (diff) | |
parent | 77576be41f3b94c0f47457d338ddbbc8bf870ba9 (diff) | |
download | guix-b4c22f25468cbb0b1644194381b25c795502bc16.tar guix-b4c22f25468cbb0b1644194381b25c795502bc16.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/system/shadow.scm')
-rw-r--r-- | gnu/system/shadow.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index 236807c70a..b66239787e 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -157,13 +157,15 @@ if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n")) # honor it and otherwise use /bin/sh. export SHELL -if [ -n \"$SSH_CLIENT\" -a -z \"`type -P cat`\" ] +if [[ $- != *i* ]] then - # We are being invoked from a non-interactive SSH session - # (as in \"ssh host command\") but 'cat' cannot be found - # in $PATH. Source /etc/profile so we get $PATH and other - # essential variables. - source /etc/profile + # We are being invoked from a non-interactive shell. If this + # is an SSH session (as in \"ssh host command\"), source + # /etc/profile so we get PATH and other essential variables. + [[ -n \"$SSH_CLIENT\" ]] && source /etc/profile + + # Don't do anything else. + return fi # Adjust the prompt depending on whether we're in 'guix environment'. |