aboutsummaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2016-07-28 11:08:55 +0200
committerAndreas Enge <andreas@enge.fr>2016-07-28 11:08:55 +0200
commite309c7561043361afe63cc9435e620323f870a61 (patch)
treecd6fe073ba840bb68f446933ece44b45d8eb5ec7 /gnu/system.scm
parent1bb163b0dd07c8f2cfd7e91f1e428075cd3d5ed2 (diff)
parente335b82c4eba13fe873db2d680d399469931c10f (diff)
downloadguix-e309c7561043361afe63cc9435e620323f870a61.tar
guix-e309c7561043361afe63cc9435e620323f870a61.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm21
1 files changed, 11 insertions, 10 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 476720b9f9..04dd7a845c 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -408,6 +408,17 @@ GUIX_PROFILE=/run/current-system/profile \\
# Prepend setuid programs.
export PATH=/run/setuid-programs:$PATH
+# Since 'lshd' does not use pam_env, /etc/environment must be explicitly
+# loaded when someone logs in via SSH. See <http://bugs.gnu.org/22175>.
+# We need 'PATH' to be defined here, for 'cat' and 'cut'. Do this before
+# reading the user's 'etc/profile' to allow variables to be overridden.
+if [ -f /etc/environment -a -n \"$SSH_CLIENT\" \\
+ -a -z \"$LINUX_MODULE_DIRECTORY\" ]
+then
+ . /etc/environment
+ export `cat /etc/environment | cut -d= -f1`
+fi
+
if [ -f \"$HOME/.guix-profile/etc/profile\" ]
then
# Load the user profile's settings.
@@ -419,16 +430,6 @@ else
export PATH=\"$HOME/.guix-profile/bin:$PATH\"
fi
-# Since 'lshd' does not use pam_env, /etc/environment must be explicitly
-# loaded when someone logs in via SSH. See <http://bugs.gnu.org/22175>.
-# We need 'PATH' to be defined here, for 'cat' and 'cut'.
-if [ -f /etc/environment -a -n \"$SSH_CLIENT\" \\
- -a -z \"$LINUX_MODULE_DIRECTORY\" ]
-then
- . /etc/environment
- export `cat /etc/environment | cut -d= -f1`
-fi
-
# Set the umask, notably for users logging in via 'lsh'.
# See <http://bugs.gnu.org/22650>.
umask 022