mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 06:36:37 -05:00
system: Test for interactive shell instead of cat
in skeleton '.bashrc'.
* gnu/system/shadow.scm (default-skeletons)[bashrc]: Wrap $SSH_CLIENT test in a conditional testing for interactive shell.
This commit is contained in:
parent
83a7a88f93
commit
0ab59dd8b8
1 changed files with 5 additions and 6 deletions
|
@ -157,13 +157,12 @@ (define copy-guile-wm
|
||||||
# honor it and otherwise use /bin/sh.
|
# honor it and otherwise use /bin/sh.
|
||||||
export SHELL
|
export SHELL
|
||||||
|
|
||||||
if [ -n \"$SSH_CLIENT\" -a -z \"`type -P cat`\" ]
|
if [[ $- != *i* ]]
|
||||||
then
|
then
|
||||||
# We are being invoked from a non-interactive SSH session
|
# We are being invoked from a non-interactive shell. If this
|
||||||
# (as in \"ssh host command\") but 'cat' cannot be found
|
# is an SSH session (as in \"ssh host command\"), source
|
||||||
# in $PATH. Source /etc/profile so we get $PATH and other
|
# /etc/profile so we get PATH and other essential variables.
|
||||||
# essential variables.
|
[[ -n \"$SSH_CLIENT\" ]] && source /etc/profile
|
||||||
source /etc/profile
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Adjust the prompt depending on whether we're in 'guix environment'.
|
# Adjust the prompt depending on whether we're in 'guix environment'.
|
||||||
|
|
Loading…
Reference in a new issue